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\nDr. Jimbo, an applied mathematic...
[{"type": "stdin_stdout", "input": "1\nA=[1 2 3;4 5 6].\n1\nA=[[1 2 3;4 5 6] [7 8;9 10] [11;12];13 14 15 16 17 18].\n3\nB=[3 -2 1;-9 8 7].\nC=([1 2 3;4 5 6]+B)(2,3).\nD=([1 0 3;4 5 6]+B)([1 2],[2 3]).\n5\nA=2*[1 2;-3 4]'.\nB=A([2 1 2],[2 1]).\nA=[1 2;3 4]*3.\nA=[2]*[1 3;2 4].\nA=[1 2;3 4]*[3].\n2\nA=[11 12 13;0 22 23;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\nToday there is going to be an un...
[{"type": "stdin_stdout", "input": "178\nTTTTTTHTHHHTHHTHHHHTTTHTHTTHTHHHTHTTTTHHTTHHHTTHHTTHHTTHHHHHTHHTTHTHHTTHHTTTTTTTTTHTHTTHTHHTHHHHHHTTTHTHHHHTHHTTHHHHTTTTTTTTHHHTHHHTHTHHHTTTTTHTHTTTHTHHTTHTTTHHHHHTTHTTHTTTHTHHHT\n", "output": "40\n"}, {"type": "stdin_stdout", "input": "178\nTTTTTTHTHHHTHHTHHHHTTTHTHTTHTHHHTHTTT...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 need to find if a number can...
[{"type": "stdin_stdout", "input": "20\n9783\n879497\n203664\n981484\n588099\n299151\n782262\n108971\n368524\n643461\n815444\n33663\n479878\n908619\n879890\n768921\n703812\n628957\n849817\n569957\n", "output": "Yes\nNo\nYes\nYes\nYes\nNo\nNo\nYes\nNo\nYes\nNo\nYes\nYes\nYes\nNo\nNo\nYes\nYes\nYes\nNo\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\nA smelt fishing tournament was h...
[{"type": "stdin_stdout", "input": "6\n1 14\n2 17\n3 131\n4 11\n4 61\n6 66", "output": "3 131\n"}, {"type": "stdin_stdout", "input": "6\n1 14\n2 25\n3 126\n4 11\n4 40\n6 66", "output": "3 126\n"}, {"type": "stdin_stdout", "input": "6\n1 14\n2 17\n3 169\n4 11\n4 61\n6 66", "output": "3 169\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\nYou have a garden consisting ent...
[{"type": "stdin_stdout", "input": "3 150\nGGGWGGGGWWGGGGGGGGGGGGGWGGWGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGWGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGWGGGGGGGWGGGGGGGGGGGGGGGGGWGGGGGGGGGGGGGGGGGGW\nGGGGGGGGGGGGWGGGGGGGGGWGGGGGGGGGGGGWGGGGGWGGGGGGGWGGGGGGGWGGGGGWGGGGGGGGGGGGGGGGGGGGGGGGWGGGGWGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSomething happened in Uzhlyandia...
[{"type": "stdin_stdout", "input": "100\n23 64 60 -45 -36 -64 -59 15 -75 69 -30 -7 -20 17 -77 58 93 -76 -121 -34 -31 16 -50 6 -20 -85 1 64 -88 -8 -15 -6 -57 25 91 10 2 -90 74 -66 -42 73 28 49 -85 30 96 79 -25 49 -59 -89 -75 14 -96 -33 -65 -8 -100 -81 17 99 -91 -5 7 -21 1 85 63 86 -26 85 -31 11 -75 35 -82 15 98 93 -55 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\nA little weird green frog speaks...
[{"input": "\"green, red or orange - we all just frogs, do not you think so?\"", "output": "[\"so think you not do frogs just all we orange or red green?\"]", "fn_name": "frogify"}, {"input": "\"multisentence is good. is not it?\"", "output": "[\"good is multisentence. it not is?\"]", "fn_name": "frogify"}, {"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\nYour task is to calculate the di...
[{"type": "stdin_stdout", "input": "3\n109 25 10\n-1 -3 -3", "output": "151.000000\n114.249726\n110.661278\n110.000000\n"}, {"type": "stdin_stdout", "input": "3\n109 25 10\n0 -3 -3", "output": "150.000000\n113.287246\n109.673356\n109.000000\n"}, {"type": "stdin_stdout", "input": "3\n109 25 10\n-1 -3 0", "output": "148....
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLet's consider a simplified vers...
[{"type": "stdin_stdout", "input": "15\nADD 14944938\nADD 40032655\nACCEPT 14944938\nACCEPT 40032655\nADD 79373162\nACCEPT 79373162\nADD 55424250\nACCEPT 55424250\nADD 67468892\nACCEPT 67468892\nADD 51815959\nADD 13976252\nADD 2040654\nADD 74300637\nACCEPT 51815959\n", "output": "32\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\nThe cat Snuke wants to play a po...
[{"type": "stdin_stdout", "input": "183\n", "output": "bon\n"}, {"type": "stdin_stdout", "input": "999\n", "output": "hon\n"}, {"type": "stdin_stdout", "input": "440\n", "output": "pon\n"}, {"type": "stdin_stdout", "input": "438\n", "output": "pon\n"}, {"type": "stdin_stdout", "input": "575\n", "output": "hon\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\nGiven a standard english sentenc...
[{"input": "\"Only themselves understand themselves and the like of themselves, As souls only understand souls\"", "output": "[\"and like of only souls souls the themselves themselves themselves understand understand Only As\"]", "fn_name": "pseudo_sort"}, {"input": "\"I, habitan of the Alleghanies, treating of him as ...
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 sequence $a$ con...
[{"type": "stdin_stdout", "input": "6\n4 1\n2 3 5 4\n5 6\n1 1 3 4 4\n1 10\n2\n2 10\n11 9\n2 10\n12 11\n5 18\n81 324 218 413 324\n", "output": "\n3\n0\n0\n-1\n1\n3\n"}, {"type": "stdin_stdout", "input": "6\n4 1\n2 3 5 4\n5 6\n1 1 3 4 4\n1 10\n2\n2 10\n11 9\n2 10\n12 11\n5 18\n81 324 218 413 324\n", "output": "3\n0\n0\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 secret message y...
[{"input": "\"87yh 99na 119e 110to 97ll 98e 108eki 116tah 119esi 111dl 98dri\"", "output": "[\"Why can we not all be like that wise old bird\"]", "fn_name": "decipher_this"}, {"input": "\"84eh 108sse 104e 115eokp 116eh 109ero 104e 104dare\"", "output": "[\"The less he spoke the more he heard\"]", "fn_name": "decipher_t...
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\nConsider the following numbers (...
[{"input": "10110", "output": "[1.000098]", "fn_name": "going"}, {"input": "113", "output": "[1.008929]", "fn_name": "going"}, {"input": "200", "output": "[1.005025]", "fn_name": "going"}, {"input": "523", "output": "[1.001915]", "fn_name": "going"}, {"input": "1011", "output": "[1.00099]", "fn_name": "going"}, {"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\n[Image] \n\nIt's the end of July...
[{"type": "stdin_stdout", "input": "433 3\nFZDDHMJGBZCHFUXBBPIEBBEFDWOMXXEPOMDGSMPIUZOMRZQNSJAVNATGIWPDFISKFQXJNVFXPHOZDAEZFDAHDXXQKZMGNSGKQNWGNGJGJZVVITKNFLVCPMZSDMCHBTVAWYVZLIXXIADXNYILEYNIQHKMOGMVOCWGHCWIYMPEPADSJAAKEGTUSEDWAHMNYJDIHBKHVUHLYGNGZDBULRXLSAJHPCMNWCEAAPYMHDTYWPADOTJTXTXUKLCHWKUSZRHEKQEFPVJEJJHRWCKYOIWAL...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nTo get money for a new aeonic bl...
[{"type": "stdin_stdout", "input": "5 10 15\nDdunkjly\n13 12 4\n83 26 1\n63 42 3\n83 22 2\n57 33 0\n59 10 1\n89 31 1\n57 17 2\n98 79 5\n46 41 3\nFbpbc\n28 21 0\n93 66 5\n66 21 0\n68 58 0\n59 17 3\n57 23 1\n72 71 1\n55 51 2\n58 40 5\n70 67 2\nKeiotmh\n73 44 4\n98 14 0\n19 7 0\n55 10 5\n30 25 4\n66 48 2\n66 51 4\n82 79 3...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nMrs Jefferson is a great teacher...
[{"input": "10", "output": "[[4, 3, 2, 1]]", "fn_name": "shortest_arrang"}, {"input": "14", "output": "[[5, 4, 3, 2]]", "fn_name": "shortest_arrang"}, {"input": "22", "output": "[[7, 6, 5, 4]]", "fn_name": "shortest_arrang"}, {"input": "65", "output": "[[33, 32]]", "fn_name": "shortest_arrang"}, {"input": "16", "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\nYou are given a table consisting...
[{"type": "stdin_stdout", "input": "20 8\n4 3 2 1 5 6 7 8\n1 2 3 4 8 7 6 5\n1 2 3 4 5 6 7 8\n1 2 3 4 5 6 7 8\n1 2 3 4 5 6 7 8\n1 2 3 4 5 6 7 8\n1 2 3 4 5 6 7 8\n1 2 3 4 5 6 7 8\n1 2 3 4 5 6 7 8\n1 2 3 4 5 6 7 8\n1 2 3 4 5 6 7 8\n1 2 3 4 5 6 7 8\n1 2 3 4 5 6 7 8\n1 2 3 4 5 6 7 8\n1 2 3 4 5 6 7 8\n1 2 3 4 5 6 7 8\n1 2 3 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWrite a function that returns th...
[{"input": "482848428248882482", "output": "[1]", "fn_name": "two_count"}, {"input": "7777777777777777", "output": "[0]", "fn_name": "two_count"}, {"input": "222222222222", "output": "[1]", "fn_name": "two_count"}, {"input": "84934656", "output": "[20]", "fn_name": "two_count"}, {"input": "17280", "output": "[7]", "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\nYou have an array $a_1, a_2, \\d...
[{"type": "stdin_stdout", "input": "99\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 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\nJzzhu is the president of countr...
[{"type": "stdin_stdout", "input": "3 3 6\n1 2 499999999\n2 3 500000000\n1 3 948187054\n2 499999999\n2 500000000\n2 499999999\n3 999999999\n3 1000000000\n3 1000000000\n", "output": "6\n"}, {"type": "stdin_stdout", "input": "3 3 6\n1 2 499999999\n2 3 500000000\n1 2 999999999\n2 499999999\n2 500000000\n2 499999999\n3 999...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 $N$ axis-aligned ...
[{"type": "stdin_stdout", "input": "3\n0 0 1 2\n0 0 2 2\n0 0 2 2", "output": "3\n"}, {"type": "stdin_stdout", "input": "3\n0 0 2 4\n0 0 2 2\n0 0 2 2", "output": "3\n"}, {"type": "stdin_stdout", "input": "3\n0 0 1 2\n0 0 2 3\n0 0 2 2", "output": "3\n"}, {"type": "stdin_stdout", "input": "3\n0 1 2 4\n0 0 2 2\n0 0 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\nYou are given an array of intege...
[{"type": "stdin_stdout", "input": "10\n3\n-54528 42942 -6804\n-54528\n3\n18649 67840 -26344\n43244\n3\n13902 51617 -4691\n32759\n3\n77397 -38549 -51828\n-45188\n3\n21750 -55472 -47700\n-55472\n3\n59264 11044 -311\n35154\n3\n-13132 88555 -52791\n-13132\n3\n-82155 25593 -3193\n-28281\n3\n-1405 586 77255\n586\n3\n30756 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 2050 and romance has long ...
[{"input": "[15, 24, 12]\n4", "output": "[\"No match!\"]", "fn_name": "match"}, {"input": "[11, 25, 36]\n1", "output": "[\"No match!\"]", "fn_name": "match"}, {"input": "[17, 31, 21]\n2", "output": "[\"No match!\"]", "fn_name": "match"}, {"input": "[35, 35, 29]\n0", "output": "[\"No match!\"]", "fn_name": "match"}, {"i...
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\nPolycarpus works as a DJ in the ...
[{"input": "\"WUBWUBWUBWUBWUBWUBWUBWUBWUBWUBWUBWUBWUBWUBWUBWUBWUBWUBWUBWUBWUBWUBWUBWUBWUBWUBWUBWUBWUBWUABWUBWUBWUBWUBWUBWUBWUBWUBWUBWUBWUBWUBWUBWUBWUBWUBWUBWUBWUBWUBWUBWUBWUBWUBWUBWUBWUB\"", "output": "[\"WUAB\"]", "fn_name": "song_decoder"}, {"input": "\"WUBYYRTSMNWUWUBWUBWUBCWUBWUBWUBCWUBWUBWUBFSYUINDWOBVWUBWUBWUBFWU...
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\nConsider an infinite triangle ma...
[{"type": "stdin_stdout", "input": "4\n3\n1 10 2\n1 3 1\n2\n4 7\n2 2\n2\n1 1000000000\n1 1000000000\n4\n3 18 5 8\n2 4 2 4\n", "output": "3\n2\n999999999\n7\n"}, {"type": "stdin_stdout", "input": "4\n3\n1 10 2\n1 3 1\n2\n3 2\n2 2\n2\n1 1000000000\n1 1000000000\n4\n3 18 5 9\n2 4 2 4\n", "output": "3\n1\n999999999\n7\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\nTakahashi Lake has a perimeter o...
[{"type": "stdin_stdout", "input": "314159265 7\n35438742\n77271666\n139044510\n156626166\n160332356\n331169608\n453863319", "output": "1023255587\n"}, {"type": "stdin_stdout", "input": "314159265 7\n35438742\n77271666\n122238627\n156626166\n160332356\n331169608\n453863319", "output": "1040061470\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\nRecently Vasya learned that, giv...
[{"type": "stdin_stdout", "input": "5\n1 0\n1 -1\n0 -1\n-1 0\n-1 -1\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "1\n-751115 -16747294\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "1\n-751115 -11499666\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "1\n-751115 -14990265\n", "output": "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\n# Valid HK Phone Number\n\n## Ov...
[{"input": "\" 1234 5678 \"", "output": "[false]", "fn_name": "is_valid_HK_phone_number"}, {"input": "\"sklfjsdklfjsf\"", "output": "[false]", "fn_name": "is_valid_HK_phone_number"}, {"input": "\"3857 4756\"", "output": "[false]", "fn_name": "is_valid_HK_phone_number"}, {"input": "\"abcd efgh\"", "output": "[fal...
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```if-not:sql\nCreate a function...
[{"input": "1545452", "output": "[\"Even\"]", "fn_name": "even_or_odd"}, {"input": "74156741", "output": "[\"Odd\"]", "fn_name": "even_or_odd"}, {"input": "100000", "output": "[\"Even\"]", "fn_name": "even_or_odd"}, {"input": "-456", "output": "[\"Even\"]", "fn_name": "even_or_odd"}, {"input": "-123", "output": "[\"Odd...
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\nTakahashi received otoshidama (N...
[{"type": "stdin_stdout", "input": "10\n100.00000000 BTC\n100.00000000 BTC\n100.00000000 BTC\n100.00000000 BTC\n100.00000000 BTC\n100.00000000 BTC\n100.00000000 BTC\n100.00000000 BTC\n100.00000000 BTC\n100.00000000 BTC\n", "output": "380000000.0\n"}, {"type": "stdin_stdout", "input": "10\n22.49891780 BTC\n59.00375526 B...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn this Kata, you will be given ...
[{"input": "[[-2, -15, -12, -8, -16], [-4, -15, -7], [-10, -5]]", "output": "[-40]", "fn_name": "solve"}, {"input": "[[-11, -6], [-20, -20], [18, -4], [-20, 1]]", "output": "[17600]", "fn_name": "solve"}, {"input": "[[14, 2], [0, -16], [-12, -16]]", "output": "[3584]", "fn_name": "solve"}, {"input": "[[-1, 2, -3, 4], [...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWrite a program which reads the ...
[{"type": "stdin_stdout", "input": "-2 2 -3 -1 461 1\n3 0 4 0 13 -1", "output": "No\n"}, {"type": "stdin_stdout", "input": "-1 2 -3 -1 461 1\n3 0 4 0 13 -1", "output": "No\n"}, {"type": "stdin_stdout", "input": "-1 2 -3 -1 461 1\n3 0 6 0 13 -1", "output": "No\n"}, {"type": "stdin_stdout", "input": "-1 2 -3 -1 461 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\nLittle Artyom decided to study p...
[{"type": "stdin_stdout", "input": "8\n0.09597231 0.11315755 0.32077119 0.22643005 0.03791746 0.04296694 0.10284494 0.05993956\n0.52402769 0.19814245 0.20452881 0.06686995 0.00468254 0.00103306 0.00055506 0.00016044\n", "output": "0.29869999999999886 0.07920000000000116 0.32760000000000133 0.0734999999999989 0.02229999...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nPolycarp has a checkered sheet o...
[{"type": "stdin_stdout", "input": "20 10\nWWBWWWBBWW\nWWWWWBWWWW\nWWWWWWWWWW\nWWWWWWWWWW\nWWWBBBWWWW\nWWWWWWWWWW\nWWWWWWWWWW\nWWWWWWWWWW\nWBWWWWWBWW\nWBWWBWWWBW\nWWBWBWWWWW\nWWWBWWBBWW\nWWBBWBWBWW\nBBWWWWWBWW\nWWBWWBBBWW\nWWWBWBBWWW\nWWWBBWBWWW\nWWWWWWWWWW\nWWWBWWWWWW\nWWWWWWWWWW\n", "output": "-1\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\nYou are playing a computer card ...
[{"type": "stdin_stdout", "input": "5\n3\n1 1\n1 1\n1 1\n3\n1 1\n1 1\n1 1\n3\n1 1\n1 1\n1 1\n3\n1 1\n1 1\n1 1\n3\n1 100\n1 1\n1 1\n", "output": "211\n"}, {"type": "stdin_stdout", "input": "5\n3\n1 1\n1 1\n1 1\n3\n1 1\n1 1\n1 1\n3\n1 1\n1 1\n1 1\n3\n1 1\n1 1\n1 1\n3\n1 100\n1 1\n1 1\n", "output": "211\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\nGiven a triangle of consecutive ...
[{"input": "93", "output": "[[8557, 8559, 8561, 8563, 8565, 8567, 8569, 8571, 8573, 8575, 8577, 8579, 8581, 8583, 8585, 8587, 8589, 8591, 8593, 8595, 8597, 8599, 8601, 8603, 8605, 8607, 8609, 8611, 8613, 8615, 8617, 8619, 8621, 8623, 8625, 8627, 8629, 8631, 8633, 8635, 8637, 8639, 8641, 8643, 8645, 8647, 8649, 8651, 86...
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 is a coder and he likes t...
[{"type": "stdin_stdout", "input": "1122 54\n2 1031\n1 363 364\n1 14 15\n1 902 903\n1 1052 1053\n2 170\n2 36\n2 194\n1 340 341\n1 1018 1019\n1 670 671\n1 558 559\n2 431\n2 351\n2 201\n1 1104 1105\n2 1056\n2 823\n1 274 275\n2 980\n1 542 543\n1 807 808\n2 157\n2 895\n1 505 506\n2 658\n1 484 485\n1 533 534\n1 384 385\n2 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\nThis problem is different from t...
[{"type": "stdin_stdout", "input": "10\n11\nartiovnldnp\nartiovsldsp\n2\naa\nzz\n2\naa\nxy\n2\nab\nba\n2\nza\nzz\n3\nabc\nbca\n16\naajjhdsjfdsfkadf\naajjhjsjfdsfkajf\n2\nix\nii\n2\noo\nqo\n2\npp\npa\n", "output": "Yes\nYes\nNo\nNo\nNo\nNo\nYes\nNo\nNo\nNo\n"}, {"type": "stdin_stdout", "input": "10\n11\nartiovnldnp\nart...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 permutation $p_1...
[{"type": "stdin_stdout", "input": "100 77\n59 92 18 16 45 82 63 43 50 68 19 13 53 79 48 28 94 49 25 77 54 8 61 66 40 100 99 20 35 14 52 56 22 17 57 36 23 90 4 65 84 42 30 27 3 15 87 32 93 74 46 91 41 9 34 12 11 7 10 86 78 72 81 73 51 55 58 97 39 31 5 24 29 88 95 6 44 37 60 62 83 33 47 21 2 38 26 98 71 75 96 70 76 69 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\nDima and Seryozha live in an ord...
[{"type": "stdin_stdout", "input": "50\n384672 661179 -775591 -989608 611120 442691 601796 502406 384323 -315945 -934146 873993 -156910 -94123 -930137 208544 816236 466922 473696 463604 794454 -872433 -149791 -858684 -467655 -555239 623978 -217138 -408658 493342 -733576 -350871 711210 884148 -426172 519986 -356885 5271...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 consist...
[{"type": "stdin_stdout", "input": "20\n49 33 9 8 50 21 12 44 23 39 24 10 17 4 17 40 24 19 27 21\n", "output": "7.010000\n"}, {"type": "stdin_stdout", "input": "20\n128 33 9 1 50 37 12 44 26 69 24 10 17 4 17 41 11 26 10 14\n", "output": "7.005\n"}, {"type": "stdin_stdout", "input": "20\n49 33 9 8 50 21 12 44 23 39 24 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\nNatasha's favourite numbers are ...
[{"type": "stdin_stdout", "input": "2000 2000\n", "output": "674532367\n"}, {"type": "stdin_stdout", "input": "1134 1092\n", "output": "134680101\n"}, {"type": "stdin_stdout", "input": "1087 1050\n", "output": "973930225\n"}, {"type": "stdin_stdout", "input": "1994 1981\n", "output": "596939902\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\nYou should write a simple functi...
[{"input": "\"\\n245980\"", "output": "[false]", "fn_name": "zipvalidate"}, {"input": "\"245980\\n\"", "output": "[false]", "fn_name": "zipvalidate"}, {"input": "\" 310587 \"", "output": "[false]", "fn_name": "zipvalidate"}, {"input": "\"1111111\"", "output": "[false]", "fn_name": "zipvalidate"}, {"input": "\"245980a\"...
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\nWelcome to Innopolis city. Throu...
[{"type": "stdin_stdout", "input": "100\n1777 339 1249 1644 785 810 228 549 1892 464 1067 639 65 1653 981 1858 863 1980 1174 427 1710 345 309 826 31 1898 255 661 1836 443 802 195 177 752 979 1842 1689 399 568 1906 129 1571 1263 696 911 810 1877 1932 1389 1128 112 619 184 434 22 1269 386 324 1635 1440 705 300 455 1635 1...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\n# Introduction and Warm-up (High...
[{"input": "[-102, -16, -1, -2, -367, -9]\n5", "output": "[-2]", "fn_name": "nth_smallest"}, {"input": "[2, 169, 13, -5, 0, -1]\n4", "output": "[2]", "fn_name": "nth_smallest"}, {"input": "[15, 20, 7, 10, 4, 3]\n3", "output": "[7]", "fn_name": "nth_smallest"}, {"input": "[-5, -1, -6, -18]\n4", "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\nMad scientist Mike is busy carry...
[{"type": "stdin_stdout", "input": "1000000 1000000 1000000\n", "output": "500000 500000 500000\n"}, {"type": "stdin_stdout", "input": "1000000 1000000 1000000\n", "output": "500000 500000 500000\n"}, {"type": "stdin_stdout", "input": "688348 726472 442198\n", "output": "486311 240161 202037\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\nA remote island chain contains n...
[{"type": "stdin_stdout", "input": "12\n0 1 2 3 4 5 6 7 8 9 10 11\n1 2 9 8 6 4 5 10 3 7 0 11\n1 2\n2 3\n3 4\n4 5\n4 6\n6 7\n3 8\n8 9\n9 10\n2 11\n11 12\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "12\n0 1 2 3 4 5 6 7 8 9 10 11\n1 2 9 8 6 4 5 10 3 7 0 11\n1 2\n2 3\n3 4\n4 5\n4 6\n6 7\n3 8\n8 9\n9 10\n8 11\n...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nOne day Polycarpus got hold of t...
[{"type": "stdin_stdout", "input": "pfdempfohomnpgbeegikfmflnalbbajpnpgeacaicoehopgnabnklheepnlnflohjegcciflmfjhachnhekckfjgoffhkblncidn\nidlhklpclcghngeggpjdgefccihndpoikojdjnbkdfjgaanoolfmnifnmbpeeghpicehjdiipnlfnjpglidpnnnjfmjfhbcogojkcfflmmfcgajbjbfaikhmjofbnjnaolbcdkelcieeodbfjcfiblhhmeelmpcmmcdhjcnnfklgedjjbaljnd...
code_stdio