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\nWe need a function ```count_sel(...
[{"input": "[4, 4, 2, -3, 1, 4, 3, 2, 0, -5, 2, -2, -2, -5]", "output": "[[14, 8, 4, [[2, 4], 3]]]", "fn_name": "count_sel"}, {"input": "[5, -1, 1, -1, -2, 5, 0, -2, -5, 3]", "output": "[[10, 7, 4, [[-2, -1, 5], 2]]]", "fn_name": "count_sel"}, {"input": "[-3, -2, -1, 3, 4, -5, -5, 5, -1, -5]", "output": "[[10, 7, 5, [[...
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 Little Elephant from the Zoo...
[{"type": "stdin_stdout", "input": "2\n3\n2 4 8\n3\n4 7 5\n\n\n", "output": "2\n-1\n"}, {"type": "stdin_stdout", "input": "2\n3\n3 4 16\n3\n1 10 6", "output": "-1\n-1\n"}, {"type": "stdin_stdout", "input": "2\n1\n1 4 6\n1\n1 13 10", "output": "-1\n-1\n"}, {"type": "stdin_stdout", "input": "2\n2\n2 3 8\n3\n0 0 11", "out...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nTry guessing the statement from ...
[{"type": "stdin_stdout", "input": "7\n69\n0\n1\n4\n5\n999\n1010\n", "output": "Y 67.98507130050643 1.014928699493561\nY 0.0 0.0\nN\nY 2.000000021073422 1.999999978926578\nY 3.6180339887498913 1.3819660112501058\nY 997.9989969899639 1.0010030100361376\nY 1008.9990079355314 1.0009920644684442\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\nUser ainta loves to play with ca...
[{"type": "stdin_stdout", "input": "79123 17331\n", "output": "6246978154\nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nCompare given two sequence $A = ...
[{"type": "stdin_stdout", "input": "4\n0 4 12 1\n5\n1 2 5 4 1", "output": "1\n"}, {"type": "stdin_stdout", "input": "4\n1 4 1 1\n2\n-1 4 5 4 2", "output": "0\n"}, {"type": "stdin_stdout", "input": "4\n1 4 1 1\n2\n-1 4 9 4 2", "output": "0\n"}, {"type": "stdin_stdout", "input": "4\n1 4 1 1\n2\n-2 4 9 4 2", "output": "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\nVasya is preparing a contest, an...
[{"type": "stdin_stdout", "input": "25\ndadddhrdhradrdzzzahazaddr\n582987584 321035417 414785252 587245865 701672370 65936511 563890835 134108386 387506178 22811155 989335244 1206131752 445085282 809768866 105799145 196558041 1131981383 134067229 875977231 488184174 41982468 225574390 702881847 937432062 185455403\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 N be a positive odd number.\...
[{"type": "stdin_stdout", "input": "5\n1.1614561119919404 1.1884479131493024 2.346315137474776 3.457070091264252 0.7256297605857085", "output": "0.0803727774076\n"}, {"type": "stdin_stdout", "input": "5\n1.1614561119919404 1.1884479131493024 2.346315137474776 4.129281462465055 0.7256297605857085", "output": "-0.1355589...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nEveryone knows passphrases. One ...
[{"input": "\"FOR THIS REASON IT IS RECOMMENDED THAT PASSPHRASES NOT BE REUSED ACROSS DIFFERENT OR UNIQUE SITES AND SERVICES.\"\n15", "output": "[\".hTrXkGtH ScP HtIxH TjFxCj gD IcTgTuUxS HhDgRp sThJtG Tq iDc hThPgWeHhPe iPwI StScTbBdRtG Hx iX CdHpTg hXwI GdU\"]", "fn_name": "play_pass"}, {"input": "\"TO BE HONEST WITH...
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\nLesha plays the recently publish...
[{"type": "stdin_stdout", "input": "1 1000000000 1000 1000 1000000000000000\n1000000000\n", "output": "1000000001000\n1000000000 \n"}, {"type": "stdin_stdout", "input": "1 1000001000 1000 1000 1000000000000000\n1000000000\n", "output": "1000001001000\n1000001000\n"}, {"type": "stdin_stdout", "input": "1 1000000000 1000...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe \"Bulls and Cows\" game need...
[{"type": "stdin_stdout", "input": "10\n0132 0 1\n6801 0 1\n8749 1 1\n8036 0 0\n7384 0 2\n8594 0 1\n9307 1 0\n7390 0 1\n6127 1 1\n0381 0 1\n", "output": "Incorrect data\n"}, {"type": "stdin_stdout", "input": "10\n8795 0 3\n4971 1 1\n5032 0 1\n5479 0 3\n2501 0 1\n9052 1 1\n3649 0 1\n1927 1 0\n9173 0 1\n8014 0 2\n", "out...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWe say that a odd number N is si...
[{"type": "stdin_stdout", "input": "6\n1 53\n7 129\n37 55\n19 51\n103 169\n13 33", "output": "4\n4\n1\n1\n1\n1\n"}, {"type": "stdin_stdout", "input": "6\n1 53\n7 129\n65 55\n19 51\n17 169\n13 49", "output": "4\n4\n-1\n1\n4\n2\n"}, {"type": "stdin_stdout", "input": "6\n1 53\n13 91\n37 55\n19 51\n73 91\n13 49\n", "output...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nTakahashi likes the sound when h...
[{"type": "stdin_stdout", "input": "100 100 100\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "1 100 100\n", "output": "100\n"}, {"type": "stdin_stdout", "input": "011 -1 106", "output": "-1\n"}, {"type": "stdin_stdout", "input": "001 -1 106", "output": "-1\n"}, {"type": "stdin_stdout", "input": "101 -1 106",...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nXenia the beginner mathematician...
[{"type": "stdin_stdout", "input": "2+3+3+1+2+2+2+1+1+2+1+3+2+2+3+3+2+2+3+3+3+1+1+1+3+3+3+2+1+3+2+3+2+1+1+3+3+3+1+2+2+1+2+2+1+2+1+3+1+1\n", "output": "1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+3+3+3+3+3+3+3+3+3+3+3+3+3+3+3+3+3\n"}, {"type": "stdin_stdout", "input": "2+1+2+2+1+3+2+3+1+1+2+1+2+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\nThe development of algae in a po...
[{"type": "stdin_stdout", "input": "28 -2 -1", "output": "-26\n-726\n-20326\n-569126\n-15935526\n-446194726\n-12493452326\n-349816665126\n-9794866623526\n-274256265458726\n"}, {"type": "stdin_stdout", "input": "17 -2 -1", "output": "-15\n-253\n-4299\n-73081\n-1242375\n-21120373\n-359046339\n-6103787761\n-103764391935\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\nSmeke has decided to participate...
[{"type": "stdin_stdout", "input": "1000\n", "output": "ABC\n"}, {"type": "stdin_stdout", "input": "2000\n", "output": "ARC\n"}, {"type": "stdin_stdout", "input": "0000", "output": "ABC\n"}, {"type": "stdin_stdout", "input": "2936", "output": "ARC\n"}, {"type": "stdin_stdout", "input": "0100", "output": "ABC\n"}, {"typ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA checksum is an algorithm that ...
[{"input": "\"ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ\"", "output": "[848640]", "fn_name": "quicksum"}, ...
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\nAfter waking up at hh:mm, Andrew...
[{"type": "stdin_stdout", "input": "20 58\n156216 11 152 99\n", "output": "191884.80000000002\n"}, {"type": "stdin_stdout", "input": "20 58\n93398 43 152 99\n", "output": "114790.40000000001\n"}, {"type": "stdin_stdout", "input": "18 46\n10753 23 46 140\n", "output": "3275.2000000000003\n"}, {"type": "stdin_stdout", "i...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLesha plays the recently publish...
[{"type": "stdin_stdout", "input": "5 5 10 20 50\n0 0 0 0 0\n", "output": " 150\n 5 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\nThe GCD table G of size n × n fo...
[{"type": "stdin_stdout", "input": "5\n537163 537163 537163 537163 537163 537163 1074326 537163 537163 537163 515139317 1074326 537163 537163 537163 539311652 321760637 170817834 537163 537163 537163 537163 537163 537163 392666153\n", "output": "539311652 515139317 392666153 321760637 170817834 "}, {"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 new school year is approaching...
[{"input": "[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 2, 2, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 0]\n6\n0\n1.5", "output": "[87]", "fn_name": "score_test"}, {"input": "[0, 1, 2, 0, 0, 2, 0, 1, 2, 1, 0, 0, 1, 0, 2, 1, 0, 2, 2, 0]\n9\n3\n2", "output": "[84]", "fn_name": "score_test"}, {"input": "[0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 0, 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\nThere is a rectangular grid of s...
[{"type": "stdin_stdout", "input": "10 10 524287\n1 2 4 8 16 32 64 128 256 512\n2 4 8 16 32 64 128 256 512 1024\n4 8 16 32 64 128 256 512 1024 2048\n8 16 32 64 128 256 512 1024 2048 4096\n16 32 64 128 256 512 1024 2048 4096 8192\n32 64 128 256 512 1024 2048 4096 8192 16384\n64 128 256 512 1024 2048 4096 8192 16384 3276...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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«One dragon. Two dragon. Three d...
[{"type": "stdin_stdout", "input": "10\n10\n10\n10\n100000\n", "output": "10000\n"}, {"type": "stdin_stdout", "input": "10\n10\n10\n4\n100000\n", "output": "30000\n"}, {"type": "stdin_stdout", "input": "10\n10\n16\n4\n100000\n", "output": "30000\n"}, {"type": "stdin_stdout", "input": "1\n1\n1\n1\n100000\n", "output": "...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe `depth` of an integer `n` is...
[{"input": "25", "output": "[36]", "fn_name": "compute_depth"}, {"input": "8", "output": "[12]", "fn_name": "compute_depth"}, {"input": "13", "output": "[8]", "fn_name": "compute_depth"}, {"input": "7", "output": "[10]", "fn_name": "compute_depth"}, {"input": "42", "output": "[9]", "fn_name": "compute_depth"}, {"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\nMr Keks is a typical white-colla...
[{"type": "stdin_stdout", "input": "30 4\n893642632982367 772277951746295 510759449350295 826812150840579 1060893142351815 525992742241552 154832018679993 645715002371268 27232975419720 475004229372388 200177708355593 810661468479466 49618609534806 301608930846726 97042172725806 441637617418914 594900693592862 62651070...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 one school with Vasya there i...
[{"type": "stdin_stdout", "input": "3 3 2 5\ndesolator\nrefresher\nperseverance\nvanguard: desolator 1, refresher 1\nmaelstorm: perseverance 2\n1 desolator\n2 perseverance\n1 refresher\n2 desolator\n2 perseverance\n", "output": "1\nvanguard 1\n2\ndesolator 1\nmaelstorm 1\n0\n"}, {"type": "stdin_stdout", "input": "2 3 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\nPrime numbers are widely applied...
[{"type": "stdin_stdout", "input": "12\n110\n200\n300\n0", "output": "5 7\n107 109\n197 199\n281 283\n"}, {"type": "stdin_stdout", "input": "12\n110\n200\n227\n0", "output": "5 7\n107 109\n197 199\n197 199\n"}, {"type": "stdin_stdout", "input": "12\n110\n200\n329\n0", "output": "5 7\n107 109\n197 199\n311 313\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\nDO YOU EXPECT ME TO FIND THIS OU...
[{"type": "stdin_stdout", "input": "10\n5 5 10 10 10 2 4 3 4 10\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "10\n5 5 10 10 10 2 4 3 4 10\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "10\n5 5 10 10 10 1 4 3 4 10\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "10\n3 5 10 10 10 1 4 3 4 10\n...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn this Kata, you will implement...
[{"input": "4111111111111111", "output": "[true]", "fn_name": "validate"}, {"input": "2626262626262626", "output": "[true]", "fn_name": "validate"}, {"input": "8675309", "output": "[false]", "fn_name": "validate"}, {"input": "922030", "output": "[false]", "fn_name": "validate"}, {"input": "912030", "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\nSmith wakes up at the side of a ...
[{"type": "stdin_stdout", "input": "15 6\naaa\naaabbb\naaabb\naaaaa\naaaaaa\naaaa\naaabbbb\naaaaa\naaaaaa\naaaa\naaabbbb\naabbbb\naa\naa\naab\na\n?a?\n??\n?aa?bb?\n?aa?aa?\n??aaa?\n", "output": "0\n4\n2\n5\n6\n7\n"}, {"type": "stdin_stdout", "input": "15 6\naaa\naaabbb\naaabb\naaaaa\naaaaaa\naaaa\naaabbbb\naaaaa\naaaaa...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWe define the \"unfairness\" of ...
[{"input": "[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]\n10", "output": "[0]", "fn_name": "min_unfairness"}, {"input": "[1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2]\n10", "output": "[1]", "fn_name": "min_unfairness"}, {"input": "[1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2]\n9", "output": "[0]", "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## Find Mean\n\nFind the mean (a...
[{"input": "[-1, 3, 5, -7]", "output": "[0]", "fn_name": "find_average"}, {"input": "[5, 7, 3, 7]", "output": "[5.5]", "fn_name": "find_average"}, {"input": "[1, 3, 5, 7]", "output": "[4]", "fn_name": "find_average"}, {"input": "[1]", "output": "[1]", "fn_name": "find_average"}, {"input": "[]", "output": "[0]", "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\nMake a program that filters a li...
[{"input": "[\"Jimm\", \"Cari\", \"aret\", \"truehdnviegkwgvke\", \"sixtyiscooooool\"]", "output": "[[\"Jimm\", \"Cari\", \"aret\"]]", "fn_name": "friend"}, {"input": "[\"This\", \"IS\", \"enough\", \"TEst\", \"CaSe\"]", "output": "[[\"This\", \"TEst\", \"CaSe\"]]", "fn_name": "friend"}, {"input": "[\"Hell\", \"Is\", \...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLeha like all kinds of strange t...
[{"type": "stdin_stdout", "input": "7\n4 12 5 15 8 2 5\n2 1 2 0 1 1 1\n", "output": "4 12 2 15 8 5 5\n"}, {"type": "stdin_stdout", "input": "7\n4 12 5 8 10 2 3\n2 1 2 1 1 1 2\n", "output": "4 12 3 10 8 5 2\n"}, {"type": "stdin_stdout", "input": "7\n4 12 5 8 10 2 3\n2 2 2 1 1 1 2\n", "output": "5 4 3 12 10 8 2\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\nMake a function **\"add\"** that...
[{"input": "[7, 14, 21, 28, 35, 42, 49, 56]", "output": "[[7, 21, 42, 70, 105, 147, 196, 252]]", "fn_name": "add"}, {"input": "[8, 16, 24, 32, 40, 48, 56, 64]", "output": "[[8, 24, 48, 80, 120, 168, 224, 288]]", "fn_name": "add"}, {"input": "[5, 10, 15, 20, 25, 30, 35, 40]", "output": "[[5, 15, 30, 50, 75, 105, 140, 18...
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 computes t...
[{"type": "stdin_stdout", "input": "-2 -1\n2 -15\n0110 -1", "output": "2\n3\n3\n"}, {"type": "stdin_stdout", "input": "10 10\n2 36\n1000 25", "output": "2\n2\n4\n"}, {"type": "stdin_stdout", "input": "-1 -1\n0 -1\n0111 14", "output": "2\n2\n3\n"}, {"type": "stdin_stdout", "input": "-2 -1\n0 -1\n0011 14", "output": "2\n...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nDothraki are planning an attack ...
[{"type": "stdin_stdout", "input": "wmtdtgddcldazqohcrpyjjebruxjxlstxmzqucvypaarrqyvhpurbyuuvteseyobmnuirrigsixjyweilabmzvhwpnovlexartiikrpcbmnckukwunkvktrziixwmwwgpeobxfgzstbepncmanhmibmrjlnxhldwpuxpzfotbryqeacgpmsypgrargxyrdwixwxybnscesviszqknlicrbcjhajafgkcekafxukcmfmhedrsqbwhczslbcngkxkohmvfjfjvmxctcvnswjaaksllwyti...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 decided to distrib...
[{"type": "stdin_stdout", "input": "100 100\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "100 10\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "111 136", "output": "1\n"}, {"type": "stdin_stdout", "input": "110 112", "output": "1\n"}, {"type": "stdin_stdout", "input": "011 127", "output": "1\n"}, {...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given an integer K. Prin...
[{"type": "stdin_stdout", "input": "451", "output": "ACLACLACLACLACLACLACLACLACLACLACLACLACLACLACLACLACLACLACLACLACLACLACLACLACLACLACLACLACLACLACLACLACLACLACLACLACLACLACLACLACLACLACLACLACLACLACLACLACLACLACLACLACLACLACLACLACLACLACLACLACLACLACLACLACLACLACLACLACLACLACLACLACLACLACLACLACLACLACLACLACLACLACLACLACLACLACLACLACL...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nHilbert's Hotel is a very unusua...
[{"type": "stdin_stdout", "input": "10\n3\n-14 -33 142\n16\n45 -84 35 85 69 -64 93 -70 0 -102 2 -52 -55 38 33 -98\n2\n5 0\n4\n-65 -113 5 6\n5\n82 -66 113 -81 -35\n5\n-125 107 -1 2 -10\n1\n25\n1\n-19\n1\n-8\n12\n32 41 43 -157 57 8 -86 111 -25 96 28 -44\n", "output": "NO\nNO\nNO\nNO\nNO\nNO\nYES\nYES\nYES\nNO\n"}, {"type...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA tatami mat, a Japanese traditi...
[{"type": "stdin_stdout", "input": "6 12\n2 18\n0 0", "output": "4\n872\n"}, {"type": "stdin_stdout", "input": "5 18\n18 4\n0 0", "output": "10\n25\n"}, {"type": "stdin_stdout", "input": "14 14\n8 3\n0 0", "output": "2\n10\n"}, {"type": "stdin_stdout", "input": "8 10\n18 4\n0 0", "output": "1\n25\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\nBrave Ponta and his best friend,...
[{"type": "stdin_stdout", "input": "5\n1 4 3 2 20\n19\n1 3 4 10\n0", "output": "10\n2\n"}, {"type": "stdin_stdout", "input": "5\n1 4 3 2 20\n19\n2 3 4 10\n0", "output": "10\n1\n"}, {"type": "stdin_stdout", "input": "5\n2 0 3 4 20\n29\n1 3 4 10\n0", "output": "11\n2\n"}, {"type": "stdin_stdout", "input": "5\n2 0 3 4 20\...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 meticulous Gerald sets the ta...
[{"type": "stdin_stdout", "input": "10\n5 1 6 2 8 3 4 10 9 7\n3 1 10 6 8 5 2 7 9 4\n2 9 1 4 10 6 8 7 3 5\n10 1 7 8 3 2 4 6 5 9\n3 2 10 4 7 8 5 6 1 9\n5 6 3 10 8 7 2 9 4 1\n6 5 1 3 2 7 9 10 8 4\n1 10 9 3 7 8 4 2 6 5\n6 8 4 5 9 1 2 10 7 3\n9 6 8 5 10 3 1 7 2 4\n5 7 4 8 9 6 1 10 3 2\n", "output": "5 1 1 1 4 5 5 1 4 5 \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 have a string $s$ and a chip...
[{"type": "stdin_stdout", "input": "1\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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\nGet the digits sum of `n...
[{"input": "1", "output": "[1]", "fn_name": "look_and_say_and_sum"}, {"input": "2", "output": "[2]", "fn_name": "look_and_say_and_sum"}, {"input": "3", "output": "[3]", "fn_name": "look_and_say_and_sum"}, {"input": "4", "output": "[5]", "fn_name": "look_and_say_and_sum"}, {"input": "5", "output": "[8]", "fn_name": "loo...
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 A 500-yen coins, B 100-...
[{"type": "stdin_stdout", "input": "30\n40\n50\n6000\n", "output": "213\n"}, {"type": "stdin_stdout", "input": "30\n40\n77\n6000", "output": "293\n"}, {"type": "stdin_stdout", "input": "30\n47\n77\n6000", "output": "319\n"}, {"type": "stdin_stdout", "input": "30\n112\n134\n6415", "output": "0\n"}, {"type": "stdin_stdou...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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$ cities numbered fr...
[{"type": "stdin_stdout", "input": "30\n13 1\n111 5\n50 5\n61 0\n76 98\n110 1\n17 1\n4 17\n72 28\n75 90\n16 0\n13 12\n57 0\n47 12\n34 13\n61 120\n3 1\n134 100\n89 94\n88 10\n42 3\n93 33\n6 5\n81 48\n31 17\n32 0\n11 5\n69 1\n58 1\n3 21\n", "output": "750\n"}, {"type": "stdin_stdout", "input": "30\n13 1\n59 5\n50 5\n61 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\nExample\n\nInput\n\n5 3\n4\n2\n5...
[{"type": "stdin_stdout", "input": "92 1\n1\n-2\n2", "output": "1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51\n52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n6...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nDima worked all day and wrote do...
[{"type": "stdin_stdout", "input": "100\n8820100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000026601\n", "output": "88201000000000000000000000000000000000000000000000000000000000000000000000000000000000000026601\n"}, {"type": "stdin_stdout", "input": "100\n8820100000000000000000...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 distinct points on a ...
[{"type": "stdin_stdout", "input": "23\n-1 1\n-1 2\n-2 4\n-7 -8\n-3 3\n-9 -14\n-5 3\n-6 2\n-7 11\n-4 4\n-8 5\n1 1\n-1 -1\n-1 -2\n-2 -4\n-7 8\n-3 -3\n-9 14\n-5 -3\n-6 -2\n-7 -11\n-4 -4\n-8 -5\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "23\n-1 1\n-1 2\n-2 4\n-7 -8\n-3 3\n-9 -14\n-5 3\n-6 2\n-7 11\n-4 4\n-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\nRead problems statements in Man...
[{"type": "stdin_stdout", "input": "2\n8\n29", "output": "255\n536870911\n"}, {"type": "stdin_stdout", "input": "2\n8\n49", "output": "255\n949480668\n"}, {"type": "stdin_stdout", "input": "2\n21\n9", "output": "2097151\n511\n"}, {"type": "stdin_stdout", "input": "2\n4\n22", "output": "15\n4194303\n"}, {"type": "stdin_...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWrite a function `getDrinkByProf...
[{"input": "\"scHOOl counselor\"", "output": "[\"Anything with Alcohol\"]", "fn_name": "get_drink_by_profession"}, {"input": "\"scHOOl COUnselor\"", "output": "[\"Anything with Alcohol\"]", "fn_name": "get_drink_by_profession"}, {"input": "\"prOgramMer\"", "output": "[\"Hipster Craft Beer\"]", "fn_name": "get_drink_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\nA superhero fights with a monste...
[{"type": "stdin_stdout", "input": "1000000000000 10\n-10 5 -2 -2 -10 -7 -5 -9 -3 -4\n", "output": "212765957448\n"}, {"type": "stdin_stdout", "input": "1000000000000 10\n-10 9 -2 -2 -10 -7 -5 -9 -3 -4\n", "output": "232558139536\n"}, {"type": "stdin_stdout", "input": "1000000000000 10\n-14 9 -2 -2 -10 -7 -5 -9 -3 -4\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\nIkta, who hates to lose, has rec...
[{"type": "stdin_stdout", "input": "...............\n...............\n...............\n...............\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 string of letters 'a' ...
[{"type": "stdin_stdout", "input": "abaaaaaabaaaabbabbaaabbbbabababaaaaabbaabbaaaaabbbaababaaaaaaabbbbbaaaaabaababbabababbabbbbaabbaabbabbbabaabbaabbaaaaaab\n", "output": "235606597\n"}, {"type": "stdin_stdout", "input": "abaaaaaabaaaabbabbaaabbbbabababaaaaabbaabbaaaaabbbaababaaaaaaabbbbbaaaaabaababbabababbabbbbaabbaab...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 $n \\times m$ grid. Y...
[{"type": "stdin_stdout", "input": "9\n1 1 0\n2 2 4\n2 2 3\n2 2 -2\n1 1 1\n100 100 11000\n2 3 7\n3 1 9\n2 6 11\n", "output": "YES\nNO\nYES\nNO\nNO\nNO\nNO\nNO\nYES\n"}, {"type": "stdin_stdout", "input": "9\n1 1 0\n2 2 4\n2 2 3\n2 2 -1\n2 1 1\n100 100 10000\n2 4 7\n3 1 9\n2 6 8\n", "output": "YES\nNO\nYES\nNO\nYES\nNO\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\nSum all the numbers of the array...
[{"input": "[-6, -20, -1, -10, -12]", "output": "[-28]", "fn_name": "sum_array"}, {"input": "[-6, 20, -1, 10, -12]", "output": "[3]", "fn_name": "sum_array"}, {"input": "[6, 0, 1, 10, 10]", "output": "[17]", "fn_name": "sum_array"}, {"input": "[6, 2, 1, 8, 10]", "output": "[16]", "fn_name": "sum_array"}, {"input": "[-3...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nBees Alice and Alesya gave beeke...
[{"type": "stdin_stdout", "input": "24 4\nSETS\nETES\nSSST\nESTE\nTSES\nSSES\nTESS\nSEEE\nETEE\nETSS\nSSEE\nESTT\nSTSS\nTTTT\nTEEE\nTSEE\nESET\nTTTE\nETTT\nSTEE\nSTTE\nESSS\nTEET\nTETE\n", "output": "31\n"}, {"type": "stdin_stdout", "input": "24 4\nSETS\nETES\nSSST\nESTE\nTSES\nSSES\nTESS\nEESE\nETEE\nETSS\nSSEE\nESTT\...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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*** No Loops Allowed ***\n\nYou ...
[{"input": "[66, \"codewars\", 11, \"alex loves pushups\"]\n\"alex loves pushups\"", "output": "[true]", "fn_name": "check"}, {"input": "[\"when's\", \"the\", \"next\", \"Katathon?\", 9, 7]\n\"Katathon?\"", "output": "[true]", "fn_name": "check"}, {"input": "[8, 7, 5, \"bored\", \"of\", \"writing\", \"tests\", 115]\n45...
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've got a list of program war...
[{"type": "stdin_stdout", "input": "60 3\n2012-03-16 16:15:25: Disk size is\n2012-03-16 16:15:25: Network failute\n2012-03-16 16:16:29: Cant write varlog\n2012-03-16 16:16:42: Unable to start process\n2012-03-16 16:16:43: Disk size is too small\n2012-03-16 16:16:53: Timeout detected\n", "output": "2012-03-16 16:16:43\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 N dice arranged in a lin...
[{"type": "stdin_stdout", "input": "10 4\n17 13 13 12 15 20 10 13 17 11\n", "output": "32.000000000000\n"}, {"type": "stdin_stdout", "input": "10 4\n17 13 13 12 15 20 10 13 17 11", "output": "32.000000000000"}, {"type": "stdin_stdout", "input": "10 4\n17 21 13 12 15 20 10 13 17 11", "output": "33.5000000000\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\nThere are N towns in JOI, which ...
[{"type": "stdin_stdout", "input": "10 3 1\n1 2 5\n3 3 2\n3 1 1\n2", "output": "7\n"}, {"type": "stdin_stdout", "input": "11 3 1\n1 1 1\n2 3 0\n3 1 1\n1", "output": "1\n"}, {"type": "stdin_stdout", "input": "10 3 1\n1 2 2\n2 3 2\n3 1 1\n1", "output": "3\n"}, {"type": "stdin_stdout", "input": "10 3 1\n1 2 2\n2 3 2\n2 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\nIf the strings are consecutive, ...
[{"type": "stdin_stdout", "input": "ab@5C1@8050\n@99,1=1@90", "output": "abCCCCC10000000050\n999999999,1=1000000000"}, {"type": "stdin_stdout", "input": "ab@5C2@8050\n@99,1=1@90", "output": "abCCCCC20000000050\n999999999,1=1000000000"}, {"type": "stdin_stdout", "input": "ab@5C1@8050\n@99+1<1@90", "output": "abCCCCC1000...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nFacetook is a well known social ...
[{"type": "stdin_stdout", "input": "kmircqsffq\n14\nfrnf likes xgmmp's post\nfnfdpupayp commented on syz's post\nxefshpn commented on xgmmp's post\nm posted on gdwydzktok's wall\neskm likes pqmbnuc's post\npnqiapduhz likes zzqvjdz's post\nx likes nouuurc's post\nvnyxhoukuo posted on uhblapjab's wall\nblpjpxn likes zvwb...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 non-negative i...
[{"type": "stdin_stdout", "input": "1999999216 1999999234\n", "output": "650\n"}, {"type": "stdin_stdout", "input": "1999999264 1999999270\n", "output": "26\n"}, {"type": "stdin_stdout", "input": "1999999266 1999999276\n", "output": "18\n"}, {"type": "stdin_stdout", "input": "1999997173 1999999190\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\nAdvanced Creative Mobile (ACM) h...
[{"type": "stdin_stdout", "input": "5\n<main>10,10,190,150<menu>20,20,70,140</menu><primary>80,20,180,140</primary></main>\n9 10\n0 17\n40 190\n2 3\n130 80\n0", "output": "OUT OF MAIN PANEL 1\nOUT OF MAIN PANEL 1\nOUT OF MAIN PANEL 1\nOUT OF MAIN PANEL 1\nprimary 0\n"}, {"type": "stdin_stdout", "input": "5\n<main>10,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\nWelcome! Everything is fine.\n\n...
[{"type": "stdin_stdout", "input": "2\n3\n1 2 3\n3 2 4\n2 4 3\n4 5 6\n5 6 5\n2\n1 2 1\n1 3 2\n1 4 3\n", "output": "15 33\n6 6\n"}, {"type": "stdin_stdout", "input": "2\n3\n1 2 0\n3 2 4\n2 4 3\n4 5 6\n5 6 5\n2\n1 2 1\n1 3 2\n1 4 3\n", "output": "12 30\n6 6\n"}, {"type": "stdin_stdout", "input": "2\n3\n1 2 0\n3 1 4\n2 4 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAlice and Bob are decorating a C...
[{"type": "stdin_stdout", "input": "100 100 100\n", "output": "297\n"}, {"type": "stdin_stdout", "input": "156 101 100\n", "output": "297\n"}, {"type": "stdin_stdout", "input": "156 111 100\n", "output": "297\n"}, {"type": "stdin_stdout", "input": "100 100 100\n", "output": "297"}, {"type": "stdin_stdout", "input": "99...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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# Story&Task\n The capital of Be...
[{"input": "[1, 2, 3, 1, 2]", "output": "[[3, 2, 0, 2, 0]]", "fn_name": "luxhouse"}, {"input": "[3, 2, 1, 4]", "output": "[[2, 3, 4, 0]]", "fn_name": "luxhouse"}, {"input": "[1, 2, 3]", "output": "[[3, 2, 0]]", "fn_name": "luxhouse"}, {"input": "[3, 2, 1]", "output": "[[0, 0, 0]]", "fn_name": "luxhouse"}, {"input": "[1...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nNew Year is coming and you are e...
[{"type": "stdin_stdout", "input": "5\n3 55\n22 30\n21 10\n20 21\n19 59\n", "output": "1205\n90\n170\n219\n241\n"}, {"type": "stdin_stdout", "input": "5\n4 55\n22 30\n21 10\n20 21\n19 59\n", "output": "1145\n90\n170\n219\n241\n"}, {"type": "stdin_stdout", "input": "5\n15 14\n22 45\n21 2\n0 21\n19 59\n", "output": "526\...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 rooted tree. Eac...
[{"type": "stdin_stdout", "input": "5 5 2\n2 0 2\n1 0 3 4\n2 2 4\n1 0 1 3\n2 4 2\n", "output": "\n2 4\n4 10\n1 3\n"}, {"type": "stdin_stdout", "input": "5 5 2\n2 0 2\n1 0 1 4\n2 2 4\n1 0 1 3\n2 4 2\n", "output": "2 4\n4 10\n1 3\n"}, {"type": "stdin_stdout", "input": "5 10 2\n2 0 2\n1 0 3 4\n2 2 4\n1 0 1 3\n2 4 2\n", "o...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nBajtek, known for his unusual gi...
[{"type": "stdin_stdout", "input": "100\n57 81 176 211 251 311 346 404 469 506 563 587 682 717 757 817 852 910 975 1012 1069 1093 1188 1223 1263 1323 1358 1416 1481 1518 1575 1599 1694 1729 1769 1829 1864 1922 1987 2024 2081 2105 2200 2235 2275 2335 2370 2428 2493 2530 2587 2611 2706 2741 2781 2841 2876 2934 2999 3036 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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": "3\n7\n48 27 99 27 93 72 2\n5\n86 73 29 1 37\n9\n45 59 22 6 75 4 14 57 23\n", "output": "NO\nYES\nNO\n"}, {"type": "stdin_stdout", "input": "4\n1\n343\n2\n4 2\n3\n4 2 4\n4\n1 1 1 1\n", "output": "YES\nYES\nNO\nYES\n"}, {"type": "stdin_stdout", "input": "1\n8\n157 5487 4421 1774 4662 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\nEudokimus, a system administrato...
[{"type": "stdin_stdout", "input": "b.baba.ebpbac.iabaeabac.abab.adabacaba.ahcggibij.adaacab.ebaba.aa.abacaba.dacabada.daqjcpc.jadab.dab\n", "output": "YES\nb.bab\na.ebp\nbac.iab\naeabac.aba\nb.ada\nbacaba.ahc\nggibij.ada\nacab.eba\nba.a\na.aba\ncaba.dac\nabada.daq\njcpc.jad\nab.dab\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\nConsider the sequence `a(1) = 7,...
[{"input": "100000", "output": "[99955]", "fn_name": "count_ones"}, {"input": "10000", "output": "[9968]", "fn_name": "count_ones"}, {"input": "1000", "output": "[975]", "fn_name": "count_ones"}, {"input": "200", "output": "[184]", "fn_name": "count_ones"}, {"input": "100", "output": "[90]", "fn_name": "count_ones"}, {...
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 simplified version of ...
[{"type": "stdin_stdout", "input": "100 50\n29 35\n10 75\n29 34\n10 87\n29 13\n29 38\n41 21\n10 6\n29 94\n10 47\n31 27\n41 24\n41 8\n10 93\n41 52\n41 36\n31 32\n85 81\n31 32\n41 79\n41 99\n85 88\n41 25\n31 68\n41 93\n10 87\n85 97\n41 85\n10 64\n10 68\n85 22\n10 45\n85 15\n10 16\n10 21\n41 66\n29 68\n41 96\n29 34\n10 22...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLot of junior developer can be s...
[{"input": "{\"user\": \"rwx\", \"group\": \"r-x\", \"other\": \"r-x\"}", "output": "[\"755\"]", "fn_name": "chmod_calculator"}, {"input": "{\"user\": \"rwx\", \"group\": \"r--\", \"other\": \"r--\"}", "output": "[\"744\"]", "fn_name": "chmod_calculator"}, {"input": "{\"user\": \"r-x\", \"group\": \"r-x\", \"other\": \...
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### Longest Palindrome\n\nFind t...
[{"input": "\"FourscoreandsevenyearsagoourfaathersbroughtforthonthiscontainentanewnationconceivedinzLibertyanddedicatedtothepropositionthatallmenarecreatedequalNowweareengagedinagreahtcivilwartestingwhetherthatnaptionoranynartionsoconceivedandsodedicatedcanlongendureWeareqmetonagreatbattlefiemldoftzhatwarWehavecometode...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLet us denote by f(x, m) the rem...
[{"type": "stdin_stdout", "input": "10000000000 99201 99975\n", "output": "992010000000000\n"}, {"type": "stdin_stdout", "input": "9999999995 82382 99996\n", "output": "309280000028478\n"}, {"type": "stdin_stdout", "input": "9999999997 38566 99996\n", "output": "309280000067758\n"}, {"type": "stdin_stdout", "input": "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\nA string $s$ of length $n$ can b...
[{"type": "stdin_stdout", "input": "100\nedykhvzcntljuuoqghptioetqnfllwekzohiuaxelgecabvsbibgqodqxvyfkbyjwtgbyhvssntinkwsinwsmalusiwnjmtcoovf\n", "output": "fvooctmjnwisulamswniswknitnssvhybgtwjybkfyvxqdoqgbqteoitnczvkyedhljuuoqghptnfllwekzohiuaxelgecabvsbi\n"}, {"type": "stdin_stdout", "input": "100\nooooooooooooooooo...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nJack really likes his number fiv...
[{"input": "200", "output": "[25000]", "fn_name": "multiply"}, {"input": "10", "output": "[250]", "fn_name": "multiply"}, {"input": "-2", "output": "[-10]", "fn_name": "multiply"}, {"input": "5", "output": "[25]", "fn_name": "multiply"}, {"input": "0", "output": "[0]", "fn_name": "multiply"}]
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\nChef Palin, as his name suggests...
[{"type": "stdin_stdout", "input": "3\nlatbcdkfy\nfeicedocljbux\naaaaaaba", "output": "luckykcul 8\nfluckyoykculf 10\nunlucky\n"}, {"type": "stdin_stdout", "input": "3\nytkdadfbl\ntobjlcedechwf\naabaaaba", "output": "luckykcul 8\nfluckyeykculf 10\nunlucky\n"}, {"type": "stdin_stdout", "input": "3\nytkdadfbl\ntobjlcfdec...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 a R...
[{"input": "\"MDCLXVI\"", "output": "[1666]", "fn_name": "solution"}, {"input": "\"MMVIII\"", "output": "[2008]", "fn_name": "solution"}, {"input": "\"XXI\"", "output": "[21]", "fn_name": "solution"}, {"input": "\"IV\"", "output": "[4]", "fn_name": "solution"}, {"input": "\"I\"", "output": "[1]", "fn_name": "solution"}...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWilliam has an array of $n$ inte...
[{"type": "stdin_stdout", "input": "5\n3\n2 4 6\n5\n4 4 4 4 4\n5\n1 3 5 10 12\n5\n1 1 1 1 1\n5\n4 8 10 6 2\n", "output": "-1\n-1\n3\n-1\n-1\n"}, {"type": "stdin_stdout", "input": "5\n3\n2 4 12\n5\n4 4 4 4 4\n5\n1 2 5 14 9\n5\n2 2 0 1 2\n5\n4 0 10 6 2\n", "output": "-1\n-1\n0\n-1\n-1\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\nFamous Brazil city Rio de Janeir...
[{"type": "stdin_stdout", "input": "1000000000000000000\n", "output": "85\n"}, {"type": "stdin_stdout", "input": "1000000000000000000\n", "output": "85\n"}, {"type": "stdin_stdout", "input": "123456789123456789\n", "output": "81\n"}, {"type": "stdin_stdout", "input": "679891637638612257\n", "output": "84\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\nThere are N students in a school...
[{"type": "stdin_stdout", "input": "1000\n", "output": "333\n"}, {"type": "stdin_stdout", "input": "303\n", "output": "101\n"}, {"type": "stdin_stdout", "input": "807\n", "output": "269\n"}, {"type": "stdin_stdout", "input": "596\n", "output": "198\n"}, {"type": "stdin_stdout", "input": "604\n", "output": "201\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\nHave you ever used the chat appl...
[{"type": "stdin_stdout", "input": "100 61 71\n11 18 0 47 33 75 91 13 8 21 73 64 50 97 62 50 2 36 68 32 64 74 32 77 81 41 23 44 40 36 45 33 21 68 57 79 75 23 67 37 99 27 30 56 75 62 75 63 46 19 79 42 11 66 21 25 2 12 89 48 75 7 57 85 80 14 82 29 66 47 29 10 1 84 79 39 33 81 73 51 80 67 52 25 38 68 57 53 38 83 83 3 86 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\nThe only difference between prob...
[{"type": "stdin_stdout", "input": "93\n6 6 10 10 8 4 7 10 2 3 4 10 7 2 8 8 4 2 4 4 7 7 3 2 3 1 5 3 7 2 4 9 10 8 10 5 1 6 2 1 10 3 5 6 6 9 3 10 1 10 1 6 2 3 8 7 1 5 4 10 4 3 5 8 8 1 3 8 2 3 10 7 2 4 5 2 6 4 10 4 4 8 5 1 6 3 1 9 5 4 9 4 3\n", "output": "4\nRRLR\n"}, {"type": "stdin_stdout", "input": "93\n6 6 10 10 9 4 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\nRead problems statements in Russ...
[{"type": "stdin_stdout", "input": "1\n3 20\n1 -2 0\n6 4 8\n4 -1 3", "output": "24\n"}, {"type": "stdin_stdout", "input": "1\n3 12\n1 0 1\n1 3 14\n13 4 3", "output": "52\n"}, {"type": "stdin_stdout", "input": "1\n3 7\n0 -1 1\n4 0 5\n12 5 3", "output": "60\n"}, {"type": "stdin_stdout", "input": "1\n3 7\n1 1 0\n2 3 20\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 computers and N sock...
[{"type": "stdin_stdout", "input": "3\n3\n4\n18\n11\n0\n10", "output": "1\n"}, {"type": "stdin_stdout", "input": "3\n3\n4\n18\n20\n0\n10", "output": "1\n"}, {"type": "stdin_stdout", "input": "3\n3\n10\n8\n7\n0\n10", "output": "1\n"}, {"type": "stdin_stdout", "input": "3\n3\n10\n9\n7\n0\n10", "output": "1\n"}, {"type": ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou love coffee and want to know...
[{"input": "14\n[13, 15, 14, 14, 15, 13]", "output": "[\"13,13,14,14\"]", "fn_name": "search"}, {"input": "14\n[7, 3, 23, 9, 14, 20, 7]", "output": "[\"3,7,7,9,14\"]", "fn_name": "search"}, {"input": "24\n[2.7, 0, 100.9, 1, 5.5]", "output": "[\"0,1,2.7,5.5\"]", "fn_name": "search"}, {"input": "14\n[17, 33, 23, 19, 19, ...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nFor a positive integer n\n\n* If...
[{"type": "stdin_stdout", "input": "3\n1043\n0", "output": "7\n124\n"}, {"type": "stdin_stdout", "input": "3\n3340\n0", "output": "7\n136\n"}, {"type": "stdin_stdout", "input": "3\n109\n0", "output": "7\n113\n"}, {"type": "stdin_stdout", "input": "3\n440\n0", "output": "7\n115\n"}, {"type": "stdin_stdout", "input": "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\nYour task is to find the first e...
[{"input": "[1, 2, 3, 4, 5, 6, 7, 8]", "output": "[null]", "fn_name": "first_non_consecutive"}, {"input": "[4, 5, 6, 7, 8, 9, 11]", "output": "[11]", "fn_name": "first_non_consecutive"}, {"input": "[1, 2, 3, 4, 6, 7, 8]", "output": "[6]", "fn_name": "first_non_consecutive"}, {"input": "[4, 6, 7, 8, 9, 11]", "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\nBaby is getting his frst tooth. ...
[{"input": "[1, 2, 5, 7, 1, 0, 9]", "output": "[6]", "fn_name": "first_tooth"}, {"input": "[20, 9, 16, 19]", "output": "[0]", "fn_name": "first_tooth"}, {"input": "[1, 1, 1, 1]", "output": "[-1]", "fn_name": "first_tooth"}, {"input": "[1, 2, 3, 4]", "output": "[3]", "fn_name": "first_tooth"}, {"input": "[1, 2, 6, 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\nYour master went to the town for...
[{"type": "stdin_stdout", "input": "5 7\nRRCABXT\nAABMFAB\nRROMJAC\nAPTADAB\nYABADAO\n3 13\nABCDEFGHIJKLM\nYMADAMIMADAMY\nACEGIKMOQSUWY\n3 4\nDEFG\nACAB\nHIJK\n3 6\nFEDCB@\nHHIAKL\nMNOPQR\n10 19\nJFZODYDXMZZPEYTRNCW\nXVGHPOKEYNZTQFZJKOD\nEYEHHQKHFZOVNRGOOLP\nQFZOIHRQMGHPNISHXOC\nDRGILJHSQEHHQLYTILL\nNCSHQMKHTZZIHRPAUJA...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 $p_i(n)$ as the fol...
[{"type": "stdin_stdout", "input": "30 5\n4 2 8 3 4\n", "output": "14 16 16 14 12 12 12 8 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14\n"}, {"type": "stdin_stdout", "input": "30 5\n4 4 8 3 4\n", "output": "10 10 14 14 8 8 8 8 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10\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\nAizuwakamatsu City is known as t...
[{"type": "stdin_stdout", "input": "4\n4\n0,1,1500\n0,2,2000\n1,2,600\n2,3,500\n0", "output": "23\n"}, {"type": "stdin_stdout", "input": "4\n4\n0,1,1500\n0,2,2000\n1,2,600\n2,3,400\n0", "output": "22\n"}, {"type": "stdin_stdout", "input": "4\n4\n0,1,0500\n0,2,2000\n0,2,600\n2,3,400\n0", "output": "12\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\nTakahashi is practicing shiritor...
[{"type": "stdin_stdout", "input": "100\nlkykrymhey\nyujwmjhnzx\nxgmkqgsajk\nkkvqjyapln\nnkcubvbxdx\nxheccrzfne\neqeizvicxx\nxesnssfeuz\nzsjdhxndds\nsuvxanfkpe\neodirlsywl\nlmiwshvenl\nluomflsyiq\nqcjuajhxme\nelfadfvxvm\nmknedshbyv\nvnboqueaai\niwexnqgqvj\njzfofokvkg\nggzhwrtktd\nderapdnumy\nyfobbqcozo\noivhkngvyy\nytj...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe Little Elephant very much lo...
[{"type": "stdin_stdout", "input": "100000000000000000 1000000000000000000\n", "output": "90000000000000000\n"}, {"type": "stdin_stdout", "input": "645762257531682046 885295120956158518\n", "output": "23953286342447648\n"}, {"type": "stdin_stdout", "input": "819875140559301752 946247219812473271\n", "output": "12637207...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nComplete the function which take...
[{"input": "[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\n1", "output": "[[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]]", "fn_name": "divisible_by"}, {"input": "[1, 2, 3, 4, 5, 6]\n2", "output": "[[2, 4, 6]]", "fn_name": "divisible_by"}, {"input": "[0, 1, 2, 3, 4, 5, 6]\n4", "output": "[[0, 4]]", "fn_name": "divisible_by"}, {"input": "[1,...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nGeorge woke up and saw the curre...
[{"type": "stdin_stdout", "input": "05:50\n05:44\n", "output": "00:06\n"}, {"type": "stdin_stdout", "input": "00:00\n01:00\n", "output": "23:00\n"}, {"type": "stdin_stdout", "input": "00:01\n00:00\n", "output": "00:01\n"}, {"type": "stdin_stdout", "input": "23:59\n23:59\n", "output": "00:00\n"}, {"type": "stdin_stdout"...
code_stdio