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\nAfter Vitaly was expelled from t... | [{"type": "stdin_stdout", "input": "5 5\n1 2\n2 3\n3 4\n4 5\n5 1\n", "output": "0 1\n"}, {"type": "stdin_stdout", "input": "6 5\n1 2\n2 3\n3 4\n4 5\n5 1\n", "output": "0 1\n"}, {"type": "stdin_stdout", "input": "9 5\n1 2\n2 3\n3 4\n4 5\n5 1\n", "output": "0 1\n"}, {"type": "stdin_stdout", "input": "100000 0\n", "output... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given a simple connected... | [{"type": "stdin_stdout", "input": "18 27\n17 9\n12 15\n18 17\n13 18\n13 1\n5 7\n12 1\n14 5\n15 11\n14 6\n1 9\n5 1\n18 16\n4 6\n7 2\n7 11\n6 3\n12 14\n5 3\n10 5\n5 8\n10 15\n3 15\n9 8\n7 15\n2 16\n18 15", "output": "No\n"}, {"type": "stdin_stdout", "input": "18 15\n17 9\n12 15\n18 17\n13 18\n13 1\n5 7\n12 1\n14 5\n15 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\nA long time ago in some far coun... | [{"type": "stdin_stdout", "input": "-1 -512 10\n", "output": "No solution\n"}, {"type": "stdin_stdout", "input": "-3 -768 13\n", "output": "No solution\n"}, {"type": "stdin_stdout", "input": "-173 373 3\n", "output": "No solution\n"}, {"type": "stdin_stdout", "input": "-521 526 1\n", "output": "No solution\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\nGiven an array of integers your ... | [{"input": "[0, 18446744073709551616, -18446744073709551617, 18446744073709551616, 18446744073709551616]", "output": "[-18446744073709551617]", "fn_name": "find_smallest_int"}, {"input": "[0, -18446744073709551615, 18446744073709551616]", "output": "[-18446744073709551615]", "fn_name": "find_smallest_int"}, {"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\nXenia the vigorous detective fac... | [{"type": "stdin_stdout", "input": "100000 1 11500 86289\n1 86 75626\n", "output": "XRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 Aizu prefecture, we decided t... | [{"type": "stdin_stdout", "input": "10 29 10", "output": "2900\n"}, {"type": "stdin_stdout", "input": "10 29 13", "output": "3770\n"}, {"type": "stdin_stdout", "input": "4 -1 104", "output": "-416\n"}, {"type": "stdin_stdout", "input": "20 -1 18", "output": "-360\n"}, {"type": "stdin_stdout", "input": "12 -1 14", "outp... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAnfisa the monkey learns to type... | [{"type": "stdin_stdout", "input": "200 1 200\nlycjpjrpkgxrkfvutlcwglghxadttpihmlpphwfttegfpimjxintjdxgqfhzrmxfcfojnxruhyfynlzgpxjeobjyxarsfxaqeogxfzvdlwsimupkwujudtfenryulzvsiazneyibqtweeuxpzrbumqqswjasliyjnnzfzuvthhzcsgfljikkajqkpjftztrzpjneaxqg\n", "output": "l\ny\nc\nj\np\nj\nr\np\nk\ng\nx\nr\nk\nf\nv\nu\nt\nl\nc\n... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe famous global economic crisi... | [{"type": "stdin_stdout", "input": "10 10\n##.#..#.#2\n...###....\n#..#....##\n.....#....\n.#........\n.....#####\n...#..#...\n....###...\n###.##...#\n.#...1#.3.\n", "output": "-1\n"}, {"type": "stdin_stdout", "input": "10 10\n#...33.#.#\n#.#.33.#1.\n2.....#.11\n222#.#.#..\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\nAs a New Year's gift, Dolphin re... | [{"type": "stdin_stdout", "input": "happy,newyear,enjoy\n", "output": "happy newyear enjoy\n"}, {"type": "stdin_stdout", "input": "haiku,atcoder,tasks\n", "output": "haiku atcoder tasks\n"}, {"type": "stdin_stdout", "input": "abcde,fghihgf,edcba\n", "output": "abcde fghihgf edcba\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\nIn the year of $30XX$ participan... | [{"type": "stdin_stdout", "input": "10 10 1 8 4\n10\n2 3 4 5 6 7 8 9\n10\n1 1 3 1\n2 1 7 1\n2 1 15 1\n7 1 4 1\n10 1 7 1\n2 1 7 1\n3 1 2 1\n5 1 2 1\n10 1 5 1\n6 1 9 1\n", "output": "3\n4\n6\n3\n3\n4\n3\n3\n4\n3\n"}, {"type": "stdin_stdout", "input": "10 10 1 8 4\n10\n2 3 4 5 6 7 8 9\n10\n1 1 3 1\n2 1 7 1\n2 1 15 1\n7 1 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou have N items that you want t... | [{"type": "stdin_stdout", "input": "1 10\n15 4\n0 3\n4 1\n13 3", "output": "15\n"}, {"type": "stdin_stdout", "input": "1 10\n27 4\n0 0\n6 1\n13 3", "output": "27\n"}, {"type": "stdin_stdout", "input": "1 10\n39 4\n1 0\n6 1\n13 3", "output": "39\n"}, {"type": "stdin_stdout", "input": "1 10\n24 4\n0 3\n5 1\n13 5", "outpu... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nGiven a time in AM/PM format as ... | [{"input": "\"12:00:01AM\"", "output": "[\"00:00:01\"]", "fn_name": "get_military_time"}, {"input": "\"01:02:03AM\"", "output": "[\"01:02:03\"]", "fn_name": "get_military_time"}, {"input": "\"02:04:05AM\"", "output": "[\"02:04:05\"]", "fn_name": "get_military_time"}, {"input": "\"03:06:07AM\"", "output": "[\"03:06:07\"... | 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# Sentence Smash\n\nWrite a func... | [{"input": "[\"this\", \"is\", \"a\", \"really\", \"long\", \"sentence\"]", "output": "[\"this is a really long sentence\"]", "fn_name": "smash"}, {"input": "[\"hello\", \"amazing\", \"world\"]", "output": "[\"hello amazing world\"]", "fn_name": "smash"}, {"input": "[\"hello\", \"world\"]", "output": "[\"hello world\"]... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWrite a function that returns th... | [{"input": "\"Walley ,Wally -Wally ;Wally +Wally :Wally\"", "output": "[-1]", "fn_name": "wheres_wally"}, {"input": "\"Walley Wally, Wally- Wally: Wally+ Wally:\"", "output": "[7]", "fn_name": "wheres_wally"}, {"input": "\"wally mollyWally Wallybrolly 'Wally\"", "output": "[-1]", "fn_name": "wheres_wally"}, {"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\nzscoder has a deck of $n+m$ cust... | [{"type": "stdin_stdout", "input": "2000000 2000000\n", "output": "507914970\n"}, {"type": "stdin_stdout", "input": "1999922 1999943\n", "output": "255234262\n"}, {"type": "stdin_stdout", "input": "1999968 1999941\n", "output": "499830706\n"}, {"type": "stdin_stdout", "input": "1999913 1999918\n", "output": "667185390\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 are to implemen... | [{"input": "\"1-10,14, 20-25:2\"", "output": "[[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 14, 20, 22, 24]]", "fn_name": "range_parser"}, {"input": "\"1-10,3\"", "output": "[[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 3]]", "fn_name": "range_parser"}, {"input": "\"5-10\"", "output": "[[5, 6, 7, 8, 9, 10]]", "fn_name": "range_parser"}, {"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\nIn McD's Burger, n hungry burger... | [{"type": "stdin_stdout", "input": "867\n490317 691111\n887872 411997\n656114 768604\n1027 17196\n982834 242480\n429255 61218\n513761 775074\n983667 410967\n412679 463744\n239690 278648\n559213 257757\n898250 192154\n795524 339490\n492066 774265\n713302 493367\n877920 234682\n500217 919598\n161118 441563\n816297 891191... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSagheer is working at a kinderga... | [{"type": "stdin_stdout", "input": "13 18 27 13\n1 1\n1 2\n1 3\n1 4\n1 17\n2 5\n2 1\n3 6\n3 2\n5 14\n5 3\n4 4\n6 9\n6 3\n7 8\n7 3\n8 7\n8 9\n10 11\n10 14\n11 10\n11 15\n11 11\n9 12\n9 11\n12 10\n13 15\n6 8\n6 14\n6 1\n6 17\n6 18\n11 12\n11 1\n11 1\n11 17\n1 18\n1 12\n1 7\n1 14\n", "output": "3\n0\n0\n0\n0\n4\n0\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 an array a of n po... | [{"type": "stdin_stdout", "input": "4\n3\n1 2 1\n5\n11 14 9 10 8\n5\n0 3 1 4 1\n4\n5 2 1 10\n", "output": "YES\nYES\nNO\nYES\n"}, {"type": "stdin_stdout", "input": "4\n3\n1 2 1\n5\n11 14 9 6 10\n5\n0 3 1 2 1\n4\n5 2 1 10\n", "output": "YES\nYES\nNO\nYES\n"}, {"type": "stdin_stdout", "input": "4\n3\n0 2 1\n5\n11 14 9 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\nIn this Kata, we are going to se... | [{"input": "\"abcdexyz\"\n\"yxz\"", "output": "[5]", "fn_name": "solve"}, {"input": "\"abdegfg\"\n\"ffdb\"", "output": "[0]", "fn_name": "solve"}, {"input": "\"aabcdefg\"\n\"fbd\"", "output": "[5]", "fn_name": "solve"}, {"input": "\"abcxyz\"\n\"ayxz\"", "output": "[2]", "fn_name": "solve"}, {"input": "\"xyz\"\n\"yxxz\"... | 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 new airplane SuperPuperJet has... | [{"type": "stdin_stdout", "input": "1000000000000000000d\n", "output": "3999999999999999994\n"}, {"type": "stdin_stdout", "input": "1000000000000000000a\n", "output": "3999999999999999995\n"}, {"type": "stdin_stdout", "input": "1000000000000000000e\n", "output": "3999999999999999993\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\nNikephoros and Polycarpus play r... | [{"type": "stdin_stdout", "input": "1457057352\nR\nPSRSRSSRPSRRSSSRSRRPRSPPSPPRPSRRPPRSRRSPPSPPSPRPRPRPSSRPRPRRPSSSSSPSRRRPSRSPPSPSRRSPSSRSRPSPRRRSRRRPSPRPPRPPPPPRPPRRRRRRPPRRSPSPSSPSSPRPRSPPRRRPSPSRSRRRRRPPPSRPRSPPSSRRRRPRPPRSPSSPRRRPPPPPRRSRSPRPPSRPRSRSRRPRRRPRSRSPRRRSRSSRPPPRRSRRSSRRPSRPPRSPSPRPRSSSRSSRRPSRRRRPSRRPP... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe Smart Beaver from ABBYY inve... | [{"type": "stdin_stdout", "input": "80 6 99\n48 97 9 77 73 21 86 78 48 5 71 16 42 67 90 27 30 52 41 86 53 4 60 17 66 38 94 46 51 51 70 11 1 16 74 53 17 12 82 95 51 33 83 70 45 27 90 57 67 2 68 15 20 61 47 90 11 5 95 33 69 35 79 51 95 45 10 17 12 88 93 43 31 31 85 68 85 81 70 43\n47 92 59 85 73 38\n", "output": "95 38 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\nAn array is called `zero-balance... | [{"input": "[-1, 1, -2, 2, -2, -2, -4, 4]", "output": "[false]", "fn_name": "is_zero_balanced"}, {"input": "[0, 0, 0, 0, 0, 0]", "output": "[true]", "fn_name": "is_zero_balanced"}, {"input": "[0, 0, 0, 0, 0]", "output": "[true]", "fn_name": "is_zero_balanced"}, {"input": "[3, -2, -1]", "output": "[false]", "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\nGiven a tree T with non-negative... | [{"type": "stdin_stdout", "input": "4\n0 2 2\n1 2 2\n2 3 12", "output": "14\n14\n12\n14\n"}, {"type": "stdin_stdout", "input": "4\n0 2 2\n1 2 2\n2 3 21", "output": "23\n23\n21\n23\n"}, {"type": "stdin_stdout", "input": "4\n0 2 2\n1 2 2\n2 3 31", "output": "33\n33\n31\n33\n"}, {"type": "stdin_stdout", "input": "4\n0 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\nAndrewid the Android is a galaxy... | [{"type": "stdin_stdout", "input": "9\n011111101\n", "output": "5\n"}, {"type": "stdin_stdout", "input": "9\n011111111\n", "output": "7\n"}, {"type": "stdin_stdout", "input": "9\n011101111\n", "output": "5\n"}, {"type": "stdin_stdout", "input": "9\n011101101\n", "output": "3\n"}, {"type": "stdin_stdout", "input": "9\n0... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\n# RegExp Fun #1 - When I miss fe... | [{"input": "\"probably Probably probably Probably probably Probably probably Probably probably Probably\"", "output": "[\"prolly Prolly prolly Prolly prolly Prolly prolly Prolly prolly Prolly\"]", "fn_name": "gym_slang"}, {"input": "\"instagram Instagram instagram Instagram instagram Instagram instagram Instagram insta... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn this problem, we use the 24-h... | [{"type": "stdin_stdout", "input": "17 -4 435 10 -1", "output": "25095\n"}, {"type": "stdin_stdout", "input": "17 -4 722 10 -1", "output": "42315\n"}, {"type": "stdin_stdout", "input": "-1 -3 436 11 -1", "output": "26235\n"}, {"type": "stdin_stdout", "input": "-1 -3 239 11 -1", "output": "14415\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\nAn elementary school student Tak... | [{"type": "stdin_stdout", "input": "1977 001 1111", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "1977 011 1111", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "1977 011 1110", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "1977 011 0110", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given a square grid with... | [{"type": "stdin_stdout", "input": "7\n1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1\n1000000000 1000000000 1000000000 1000000000 1000000000 1 1000000000\n1000000000 1000000000 1000000000 1000000000 1 1000000000 1000000000\n1000000000 1000000000 1000000000 1 1000000000 1000000000 1000000000\n10000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 little Vasya found mom's... | [{"type": "stdin_stdout", "input": "30 10\nUTNTGOKZYJ\nQHOUHNYZVW\nLTVGHJRZVW\nMZHYHOLZYJ\nERYEUEPZYE\nUZDBFTURYJ\nRVSMQTIZGW\nWDJQHMIRYY\nKCORHQPZYE\nRRPLFOZZVY\nJTXMFNNNYJ\nMVTGGOZZVV\nEHAFFNUZVF\nLBRNWJZNYE\nJVMOHTPZYJ\nWTARFJLZVV\nLVJCWOURVW\nLCLQFJYRVV\nQVBVGNJRYF\nNTZGHOLRYE\nMGQKHOUPYJ\nRRSSBXPZYJ\nRYCRGTLZYJ\nJ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 that extracts n ... | [{"type": "stdin_stdout", "input": "4 133\n-1 0\n0 0", "output": "15011\n0\n"}, {"type": "stdin_stdout", "input": "4 102\n-1 0\n0 0", "output": "7153\n0\n"}, {"type": "stdin_stdout", "input": "8 80\n2 -2\n0 0", "output": "37638\n0\n"}, {"type": "stdin_stdout", "input": "3 133\n-1 0\n0 0", "output": "1202\n0\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\nThe capital of Berland looks lik... | [{"type": "stdin_stdout", "input": "1000000000 1010000000 10\n668983398 843926244\n730038846 389721428\n400508549 779159281\n683648123 559948749\n105869012 181419826\n391396726 503295408\n248489591 686114055\n102102370 108241714\n610800354 28286278\n587730768 379340837\n", "output": "331016602\n"}, {"type": "stdin_stdo... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA string is called bracket seque... | [{"type": "stdin_stdout", "input": "20\n(())(()()())(())()()\n", "output": "01100111111001100000\n"}, {"type": "stdin_stdout", "input": "20\n(()()()())(()())()()\n", "output": "01111111100111100000\n"}, {"type": "stdin_stdout", "input": "20\n(())(())(())()(())()\n", "output": "01100110011000011000\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\nThere are many freight trains de... | [{"type": "stdin_stdout", "input": "10 24 60 8\n10 59\n21 56\n0 42\n21 27\n5 24\n5 53\n16 5\n5 22\n10 11\n10 46\n", "output": "1 5\n1 \n"}, {"type": "stdin_stdout", "input": "10 24 60 8\n10 59\n21 56\n0 42\n21 27\n5 24\n5 53\n16 5\n5 22\n10 11\n10 46\n", "output": "1 5\n1 \n"}, {"type": "stdin_stdout", "input": "9 24 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\n# A History Lesson\n\nThe Pony E... | [{"input": "[90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIt's well known that the best wa... | [{"type": "stdin_stdout", "input": "15 17\n1 10 8\n5 19 1\n12 14 6\n9 19 8\n6 7 3\n5 11 9\n7 12 5\n17 20 8\n6 12 6\n11 19 4\n3 14 1\n15 19 10\n3 20 5\n5 19 9\n10 18 10\n", "output": "11\n"}, {"type": "stdin_stdout", "input": "15 17\n1 10 8\n5 19 1\n12 14 6\n9 19 8\n6 7 3\n5 11 9\n7 12 5\n17 20 8\n6 12 6\n11 19 4\n3 14 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nInternational Carpenters Profess... | [{"type": "stdin_stdout", "input": "3\n-1 ( 10\n10 ) 5\n10 ) 5", "output": "No\nNo\nYes\n"}, {"type": "stdin_stdout", "input": "3\n-1 ( 0\n10 ) 4\n20 ( 4", "output": "Yes\nNo\nYes\n"}, {"type": "stdin_stdout", "input": "3\n-1 ) 10\n10 ( 12\n10 ( 7", "output": "No\nNo\nNo\n"}, {"type": "stdin_stdout", "input": "3\n-1 ( ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nCreate a program that outputs th... | [{"type": "stdin_stdout", "input": "6\n5\n-1\n2\n0\n0", "output": "105.971422738\n-3.12310562562\n"}, {"type": "stdin_stdout", "input": "6\n5\n14\n4\n0\n0", "output": "105.971422738\n421.743216952\n"}, {"type": "stdin_stdout", "input": "6\n5\n14\n3\n0\n0", "output": "105.971422738\n409.241646964\n"}, {"type": "stdin_st... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWhen provided with a number betw... | [{"input": "3", "output": "[\"Three\"]", "fn_name": "switch_it_up"}, {"input": "7", "output": "[\"Seven\"]", "fn_name": "switch_it_up"}, {"input": "8", "output": "[\"Eight\"]", "fn_name": "switch_it_up"}, {"input": "0", "output": "[\"Zero\"]", "fn_name": "switch_it_up"}, {"input": "4", "output": "[\"Four\"]", "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# Task\n let F(N) be the sum squ... | [{"input": "810", "output": "[8]", "fn_name": "repeat_sequence_len"}, {"input": "812", "output": "[8]", "fn_name": "repeat_sequence_len"}, {"input": "818", "output": "[1]", "fn_name": "repeat_sequence_len"}, {"input": "833", "output": "[1]", "fn_name": "repeat_sequence_len"}, {"input": "85", "output": "[8]", "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\nThere is a rectangle in the xy-p... | [{"type": "stdin_stdout", "input": "18 1 -1\n2 -1 1\n5 2 1\n1 1 4\n5 2 0\n2 0 12", "output": "18\n"}, {"type": "stdin_stdout", "input": "10 10 5\n1 6 1\n4 1 3\n6 9 4\n9 4 2\n3 1 3\n", "output": "64\n"}, {"type": "stdin_stdout", "input": "10 10 5\n1 14 1\n4 1 1\n6 4 4\n9 0 2\n3 2 4", "output": "10\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\nThere are $n$ robots driving alo... | [{"type": "stdin_stdout", "input": "1\n20 170\n4 6 8 9 10 13 14 16 18 20 23 28 30 32 33 38 42 43 45 46\nL L L L L L L L L L R R R L L R R L R R\n", "output": "5 5 9 11 9 11 15 15 19 19 5 137 1 1 5 137 126 169 169 126\n"}, {"type": "stdin_stdout", "input": "1\n20 170\n4 1 8 9 10 13 14 16 18 20 23 28 30 32 33 38 42 43 45... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nKuriyama Mirai has killed many m... | [{"type": "stdin_stdout", "input": "56\n43 100 44 66 65 11 26 75 96 77 5 15 75 96 11 44 11 97 75 53 33 26 32 33 90 26 68 72 5 44 53 26 33 88 68 25 84 21 25 92 1 84 21 66 94 35 76 51 11 95 67 4 61 3 34 18\n27\n1 20 38\n1 11 46\n2 42 53\n1 8 11\n2 11 42\n2 35 39\n2 37 41\n1 48 51\n1 32 51\n1 36 40\n1 31 56\n1 18 38\n2 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\nIn a public bath, there is a sho... | [{"type": "stdin_stdout", "input": "4 1000000000\n0 1100 1000000 1000000000", "output": "2000000000\n"}, {"type": "stdin_stdout", "input": "4 1000000000\n0 1100 1000000 1010000000", "output": "2001000000\n"}, {"type": "stdin_stdout", "input": "4 1000010000\n0 1000 1000000 1000000000", "output": "2000010000\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\nThis kata requires you to conver... | [{"input": "565757", "output": "[\"9429:17\"]", "fn_name": "time_convert"}, {"input": "134", "output": "[\"02:14\"]", "fn_name": "time_convert"}, {"input": "180", "output": "[\"03:00\"]", "fn_name": "time_convert"}, {"input": "970", "output": "[\"16:10\"]", "fn_name": "time_convert"}, {"input": "-6", "output": "[\"00:0... | 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 an undirected tree of $... | [{"type": "stdin_stdout", "input": "4\n8 4 7\n1 2\n2 3\n1 4\n4 5\n4 6\n1 7\n7 8\n4 3 2\n4 3\n1 2\n2 3\n9 3 5\n1 2\n2 3\n3 4\n1 5\n5 6\n6 7\n1 8\n8 9\n16 15 12\n1 2\n2 3\n1 4\n4 5\n5 6\n6 7\n4 8\n10 9\n8 13\n10 11\n11 12\n11 13\n13 14\n10 15\n15 16\n", "output": "YES\nNO\nNO\nYES\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\nTo become the king of Codeforces... | [{"type": "stdin_stdout", "input": "140 149\n124 109 136 123 83 121 53 37 111 105 75 224 99 87 51 45 131 83 18 76 99 29 115 96 16 89 88 69 81 100 120 90 141 48 83 97 26 27 51 94 53 25 32 27 4 139 81 140 137 95 94 89 116 32 85 155 68 12 107 10 124 96 110 32 135 126 2 146 79 14 132 136 110 16 130 98 109 191 2 18 52 27 13... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\n# Task\n You have some people wh... | [{"input": "[100, 100, 100, 90, 1, 0, 0]", "output": "[false]", "fn_name": "learn_charitable_game"}, {"input": "[33, 19, 38, 87, 93, 4]", "output": "[false]", "fn_name": "learn_charitable_game"}, {"input": "[0, 0, 0, 0]", "output": "[false]", "fn_name": "learn_charitable_game"}, {"input": "[0, 56, 100]", "output": "[tr... | 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 friend Mishka and you atten... | [{"type": "stdin_stdout", "input": "10 5\n1 1 1 1 1 1 1 1 10000 1\n1 1 1 1 1 1 1 1 0 1\n", "output": "10009\n"}, {"type": "stdin_stdout", "input": "10 5\n1 1 1 1 1 1 1 1 10000 1\n1 1 1 1 1 1 1 1 0 1\n", "output": "10009\n"}, {"type": "stdin_stdout", "input": "10 5\n1 1 1 1 1 1 1 1 10000 1\n1 1 1 0 1 1 1 1 0 1\n", "outp... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nToad Zitz has an array of intege... | [{"type": "stdin_stdout", "input": "100 1000\n980 755 745 448 424 691 210 545 942 979 555 783 425 942 495 741 487 514 752 434 187 874 372 617 414 505 659 445 81 397 243 986 441 587 31 350 831 801 194 103 723 166 108 182 252 846 328 905 639 690 738 638 986 340 559 626 572 808 442 410 179 549 880 153 449 99 434 945 163 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\nThe Cybernetics Failures (CF) or... | [{"type": "stdin_stdout", "input": "15 17 8 9\nURRDLUULLDDDRRURR\n", "output": "1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 0 0 241\n"}, {"type": "stdin_stdout", "input": "15 17 8 9\nURRDLUULLDDDRRURR\n", "output": "1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 0 0 241 "}, {"type": "stdin_stdout", "input": "15 17 7 9\nURRDLUULLDDDRRURR\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\nYour favorite music streaming pl... | [{"type": "stdin_stdout", "input": "100\n7585 5510 1017 4329 2840 8171 5089 1873 7308 9656 6833 7578 4914 6658 4408 7122 5265 1204 9800 3150 2151 6906 6041 3973 931 7239 4421 4211 156 8655 4266 3543 9752 3117 2731 6052 8950 9391 6367 996 9973 629 9489 4912 9226 9301 5166 4889 3710 6794 618 9155 2462 1120 5499 5861 3177... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 to rebuild a string fro... | [{"input": "[[\"a\", 0]]", "output": "[false]", "fn_name": "denumerate"}, {"input": "[[1, \"a\"]]", "output": "[false]", "fn_name": "denumerate"}, {"input": "[[0, \"\"]]", "output": "[false]", "fn_name": "denumerate"}, {"input": "\"a\"", "output": "[false]", "fn_name": "denumerate"}, {"input": "[0]", "output": "[false]... | 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\nAccording to an old legeng, a lo... | [{"type": "stdin_stdout", "input": "100\n98 52 63 2 18 96 31 58 84 40 41 45 66 100 46 71 26 48 81 20 73 91 68 76 13 93 17 29 64 95 79 21 55 75 19 85 54 51 89 78 15 87 43 59 36 1 90 35 65 56 62 28 86 5 82 49 3 99 33 9 92 32 74 69 27 22 77 16 44 94 34 6 57 70 23 12 61 25 8 11 67 47 83 88 10 14 30 7 97 60 42 37 24 38 53 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 life goes up and down, just ... | [{"type": "stdin_stdout", "input": "50\n11836 28308 72527 92281 139289 93797 134555 148444 40866 111317 21564 87813 65466 20541 99238 2287 74647 128071 18163 61672 39766 55589 138385 147443 138100 142683 60703 15444 52566 72976 147412 116006 115986 110545 79993 100440 9876 71470 75209 62443 64906 88987 72232 2246 63160... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nVanya walks late at night along ... | [{"type": "stdin_stdout", "input": "46 615683844\n431749087 271781274 274974690 324606253 480870261 401650581 13285442 478090364 266585394 425024433 588791449 492057200 391293435 563090494 317950 173675329 473068378 356306865 311731938 192959832 321180686 141984626 578985584 512026637 175885185 590844074 47103801 21221... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIahub likes trees very much. Rec... | [{"type": "stdin_stdout", "input": "10 10\n418 45 865 869 745 901 177 773 854 462\n4 8\n1 4\n3 6\n1 5\n1 10\n5 9\n1 2\n4 7\n1 3\n2 2\n1 6 246\n1 4 296\n1 2 378\n1 8 648\n2 6\n1 5 288\n1 6 981\n1 2 868\n2 7\n", "output": "45\n1147\n-119\n"}, {"type": "stdin_stdout", "input": "10 10\n418 45 865 869 745 901 177 773 854 46... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn the capital city of Berland, ... | [{"type": "stdin_stdout", "input": "100 10\n9199\n89 409 428 408 309 400 259 393 212 273 472 654 533 774 663 484 695 801 587 518 521 578 767 644 532 785 500 944 582 680 899 882 589 601 614 633 877 543 770 614 852 715 932 627 639 658 765 957 898 545 977 751 740 869 885 831 834 702 934 954 500 626 605 921 755 661 707 952... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nHamming distance between strings... | [{"type": "stdin_stdout", "input": "5728 5729 5750\n5631 5768\n9209\n", "output": "10344\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 contest is `CODE FESTIVAL`.... | [{"type": "stdin_stdout", "input": "ETAUDARGTSOP", "output": "ETAU DARGTSOP\n"}, {"type": "stdin_stdout", "input": "AACDEFGHIJKL", "output": "AACD EFGHIJKL\n"}, {"type": "stdin_stdout", "input": "COCEFESTIVAL", "output": "COCE FESTIVAL\n"}, {"type": "stdin_stdout", "input": "POSTGRADUATF", "output": "POST GRADUATF\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 N coins each of which h... | [{"type": "stdin_stdout", "input": "5 4 7 19\n1 10 2 2 -1", "output": "4\n"}, {"type": "stdin_stdout", "input": "5 6 7 19\n1 10 2 2 -1", "output": "0\n"}, {"type": "stdin_stdout", "input": "5 4 13 19\n1 5 1 2 -1", "output": "0\n"}, {"type": "stdin_stdout", "input": "5 6 10 7\n1 10 2 2 -1", "output": "0\n"}, {"type": "s... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nHave you ever tried to explain t... | [{"type": "stdin_stdout", "input": "11 59 59 11 12\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "12 12 12 11 12\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "11 59 59 12 11\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "12 12 12 11 12\n", "output": "YES\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 are given a convex polygon P... | [{"type": "stdin_stdout", "input": "19\n449447997 711296339\n530233434 692216537\n535464528 613140435\n535533467 100893188\n530498867 -265063956\n519107979 -271820709\n482156929 -287792333\n-303730271 -287970295\n-416935204 -263348201\n-443613873 -249980523\n-453444829 -173903413\n-462102798 -80789280\n-462064673 -1322... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 caught N sardines. The d... | [{"type": "stdin_stdout", "input": "10\n2 0\n2 -1\n-1 -1\n1 20\n0 -1\n-18 -1\n1 -1\n1 1\n-5 -1\n4 0", "output": "399\n"}, {"type": "stdin_stdout", "input": "10\n2 0\n0 0\n-1 2\n-1 13\n-2 -26\n-11 -1\n2 -1\n0 1\n0 0\n0 4", "output": "161\n"}, {"type": "stdin_stdout", "input": "10\n2 -1\n0 0\n-1 2\n-1 13\n0 -26\n-16 -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 will be given a string (x) f... | [{"input": "\"............C.............D..m...\"\n8", "output": "[\"Escaped!\"]", "fn_name": "cat_mouse"}, {"input": "\"m.C...\"\n5", "output": "[\"boring without all three\"]", "fn_name": "cat_mouse"}, {"input": "\".CD......m.\"\n10", "output": "[\"Protected!\"]", "fn_name": "cat_mouse"}, {"input": "\".CD......m.\"\n... | 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 protection of a popular prog... | [{"type": "stdin_stdout", "input": "91537\n", "output": "27651\n"}, {"type": "stdin_stdout", "input": "13542\n", "output": "84443\n"}, {"type": "stdin_stdout", "input": "32036\n", "output": "82432\n"}, {"type": "stdin_stdout", "input": "71232\n", "output": "10151\n"}, {"type": "stdin_stdout", "input": "10000\n", "outpu... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThis time the Berland Team Olymp... | [{"type": "stdin_stdout", "input": "10 5 1000000000\n1 1 1 2 2 1 2 2 2 2\n", "output": "10000000000\n"}, {"type": "stdin_stdout", "input": "10 5 1000000000\n1 1 1 2 2 1 2 2 3 2\n", "output": "10000000000\n"}, {"type": "stdin_stdout", "input": "10 5 1000000000\n1 1 1 2 0 1 2 2 3 2\n", "output": "10000000000\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\nIn the Kingdom of AtCoder, peopl... | [{"type": "stdin_stdout", "input": "upruskhsmeicaqqesyyvopepmvdosibrvqoghdeikbpqbfgrufxdsqchjkuxpxngebxrmqdgqjsosencrbwknllvucvubyozfmttxtlsrrnrqavshaszrenhlbzpnpjgqftvwgukjwsekfcgllbzlnvmosmvqubtwsgltvmmzmslqdxqiifzkaqhsxzguseuexlycgubhdnwhrssyiybitcoowlhmmrdpgtrdwalvffknwibhwhacqfjcmwupoxonavvxwsvprpymskznabsquwssucx... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 stones on the table ... | [{"type": "stdin_stdout", "input": "50\nGRBGGRBRGRBGGBBBBBGGGBBBBRBRGBRRBRGBBBRBBRRGBGGGRB\n", "output": "18\n"}, {"type": "stdin_stdout", "input": "50\nRBGGBGGRBGRBBBGBBGRBBBGGGRBBBGBBBGRGGBGGBRBGBGRRGG\n", "output": "17\n"}, {"type": "stdin_stdout", "input": "50\nGGGBBRGGGGGRRGGRBGGRGBBRBRRBGRGBBBGBRBGRGBBGRGGBRB\n",... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA boy Valera registered on site ... | [{"type": "stdin_stdout", "input": "230 125 175 124 1 1\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "230 125 221 124 1 1\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "230 195 221 124 1 1\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "375 6 133 267 19 36\n", "output": "NO\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\nIn this task Anna and Maria play... | [{"type": "stdin_stdout", "input": "S......A\n.SS..S..\nS....S..\nSSS...S.\n.SS.STS.\n.S.SS...\n..S..S..\nM.SS....\n", "output": "LOSE\n"}, {"type": "stdin_stdout", "input": "SSSSSSSA\n......S.\n/.....S.\n.....SS.\n....SS..\n...SS...\n..SS....\nMSS.....\n", "output": "LOSE\n"}, {"type": "stdin_stdout", "input": "S..SSS... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 sequence of items and a ... | [{"input": "[1, 2, 3, 4, 5, 6, 7, 8]\n3", "output": "[4]", "fn_name": "next_item"}, {"input": "[\"a\", \"b\", \"c\"]\n\"d\"", "output": "[null]", "fn_name": "next_item"}, {"input": "[\"a\", \"b\", \"c\"]\n\"c\"", "output": "[null]", "fn_name": "next_item"}, {"input": "\"testing\"\n\"t\"", "output": "[\"e\"]", "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\nThere are N balls and N+1 holes ... | [{"type": "stdin_stdout", "input": "1000 100 100", "output": "649620280.957660079002380"}, {"type": "stdin_stdout", "input": "1110 100 110", "output": "894375868.485796213150\n"}, {"type": "stdin_stdout", "input": "1110 101 110", "output": "894383190.732867240906\n"}, {"type": "stdin_stdout", "input": "1110 111 100", "... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe Berland Armed Forces System ... | [{"type": "stdin_stdout", "input": "100\n63 65 21 41 95 23 3 4 12 23 95 50 75 63 58 34 71 27 75 31 23 94 96 74 69 34 43 25 25 55 44 19 43 86 68 17 52 65 36 29 72 96 84 25 84 23 71 54 6 7 71 7 21 100 99 58 93 35 62 47 36 70 68 9 75 13 35 70 76 36 62 22 52 51 2 87 66 41 54 35 78 62 30 35 65 44 74 93 78 37 96 70 26 32 71 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\n## Task\n\nWrite a method `remai... | [{"input": "19\n2", "output": "[1]", "fn_name": "remainder"}, {"input": "10\n2", "output": "[0]", "fn_name": "remainder"}, {"input": "34\n7", "output": "[6]", "fn_name": "remainder"}, {"input": "27\n5", "output": "[2]", "fn_name": "remainder"}, {"input": "3\n2", "output": "[1]", "fn_name": "remainder"}] | 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 rectangular para... | [{"type": "stdin_stdout", "input": "10\n9 6 8\n5 5 2\n8 9 2\n2 7 9\n6 4 10\n1 1 5\n2 15 1\n10 2 3\n12 5 4\n17 6 4\n", "output": "41\n6\n21\n12\n39\n2\n8\n14\n30\n22\n"}, {"type": "stdin_stdout", "input": "10\n9 6 8\n5 5 2\n8 9 2\n2 7 9\n6 4 10\n1 1 5\n2 8 1\n10 2 3\n12 5 4\n17 5 4\n", "output": "41\n6\n21\n12\n39\n2\n7... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe final match of the Berland F... | [{"type": "stdin_stdout", "input": "1000\n1000\n1000\n1000\n1999999\n", "output": "1999 1999\n"}, {"type": "stdin_stdout", "input": "1000\n1000\n1000\n1000\n2000000\n", "output": "2000 2000\n"}, {"type": "stdin_stdout", "input": "1000\n1000\n1000\n1000\n2000000\n", "output": "2000 2000\n"}, {"type": "stdin_stdout", "in... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nN players will participate in a ... | [{"type": "stdin_stdout", "input": "171\n158 2 11 40 53 51 26 89 135 78 167 25 123 157 100 152 72 35 39 126 124 119 68 105 162 150 84 82 59 109 28 70 34 110 85 136 57 145 134 47 99 20 83 95 154 98 73 138 48 29 120 116 66 58 96 18 102 24 153 127 125 61 32 129 16 131 50 46 10 113 91 75 13 86 65 45 146 133 122 103 128 93 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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's actual name, \"Le... | [{"type": "stdin_stdout", "input": "zzzzzzzzzz\n", "output": "zzzzzzzzzz\n"}, {"type": "stdin_stdout", "input": "aaaaaaaaaa\n", "output": "aaaaaaaaaa\n"}, {"type": "stdin_stdout", "input": "zzzzzzzazz\n", "output": "zzzzzzzzz\n"}, {"type": "stdin_stdout", "input": "abbbbbbbbb\n", "output": "bbbbbbbbb\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\nTsumugi brought $n$ delicious sw... | [{"type": "stdin_stdout", "input": "37 13\n164823 8992 21818 77521 130870 83201 174985 168799 9565 84443 105083 54131 130813 42829 98759 60103 198520 125068 59611 45609 124003 106143 54167 179002 103755 152802 146640 74767 91309 11941 131534 32533 67324 27272 49166 129157 41630\n", "output": "8992 18557 30498 52316 795... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nHow can you tell an extrovert fr... | [{"input": "\"How can you tell an extrovert from an\\nintrovert at NSA? Va gur ryringbef,\\ngur rkgebireg ybbxf ng gur BGURE thl'f fubrf.\"", "output": "[\"Ubj pna lbh gryy na rkgebireg sebz na\\nvagebireg ng AFN? In the elevators,\\nthe extrovert looks at the OTHER guy's shoes.\"]", "fn_name": "rot13"}, {"input": "\"G... | 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\nLunar New Year is approaching, a... | [{"type": "stdin_stdout", "input": "26\n150393140 360409816 380562806 954731482 34457876 66727907 376298532 679315200 260466665 597680044 95770656 948689469 209020313 926343072 66801160 426280560 927872284 389224547 492602065 324416078 776983298 191080523 167234113 791882865 365749226 28861923\n755656155 336170357\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\nBob is a lazy man. \n\nHe needs ... | [{"input": "\"u_n_d_e_r__S_C_O_R_E\"", "output": "[10]", "fn_name": "count_letters_and_digits"}, {"input": "\"de?=?=tttes!!t\"", "output": "[8]", "fn_name": "count_letters_and_digits"}, {"input": "\"n!!ice!!123\"", "output": "[7]", "fn_name": "count_letters_and_digits"}, {"input": "\"!@#$%^&`~.\"", "output": "[0]", "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\nAlex enjoys performing magic tri... | [{"type": "stdin_stdout", "input": "999 504\n", "output": "0.0019990178729991604\n"}, {"type": "stdin_stdout", "input": "614 123\n", "output": "0.0032414781922363548\n"}, {"type": "stdin_stdout", "input": "723 1000\n", "output": "0.002762959403995896\n"}, {"type": "stdin_stdout", "input": "975 504\n", "output": "0.0020... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAtCoDeer the deer and his friend... | [{"type": "stdin_stdout", "input": "ggppgggpgg\n", "output": "2\n"}, {"type": "stdin_stdout", "input": "ggpgggppgg", "output": "2\n"}, {"type": "stdin_stdout", "input": "ggggggpppg", "output": "2\n"}, {"type": "stdin_stdout", "input": "ggppgpgggg", "output": "2\n"}, {"type": "stdin_stdout", "input": "ggppggpggg", "outp... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\n### Unfinished Loop - Bug Fixing... | [{"input": "10", "output": "[[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]]", "fn_name": "create_array"}, {"input": "9", "output": "[[1, 2, 3, 4, 5, 6, 7, 8, 9]]", "fn_name": "create_array"}, {"input": "8", "output": "[[1, 2, 3, 4, 5, 6, 7, 8]]", "fn_name": "create_array"}, {"input": "7", "output": "[[1, 2, 3, 4, 5, 6, 7]]", "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\nHaiku is a genre of Japanese tra... | [{"type": "stdin_stdout", "input": "aaaaaccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc\naaaaaaaccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc\naaaaaccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nTwo bored soldiers are playing c... | [{"type": "stdin_stdout", "input": "10\n9 8 7 6 2 3 5 4 10 1\n1 9\n", "output": "103 1\n"}, {"type": "stdin_stdout", "input": "10\n1 10\n9 5 7 6 1 2 3 9 8 4\n", "output": "105 1\n"}, {"type": "stdin_stdout", "input": "10\n9 8 7 6 2 3 5 4 9 1\n1 10\n", "output": "105 2\n"}, {"type": "stdin_stdout", "input": "10\n9 8 7 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\nn soldiers stand in a circle. Fo... | [{"type": "stdin_stdout", "input": "88\n1000 1000 1000 1000 1000 998 998 1000 1000 1000 1000 999 999 1000 1000 1000 999 1000 997 999 997 1000 999 998 1000 999 1000 1000 1000 999 1000 999 999 1000 1000 999 1000 999 1000 1000 998 1000 1000 1000 998 998 1000 1000 999 1000 1000 1000 1000 1000 1000 1000 998 1000 1000 1000 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\nYou are given a string S consist... | [{"type": "stdin_stdout", "input": "TTTTTTTTTT\n", "output": "10\n"}, {"type": "stdin_stdout", "input": "BBBBBBBBBB\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "GACGCTCCAV\n", "output": "9\n"}, {"type": "stdin_stdout", "input": "CTTAHTGACT\n", "output": "5\n"}, {"type": "stdin_stdout", "input": "TGMJCTTDAA\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYaroslav has an array that consi... | [{"type": "stdin_stdout", "input": "100\n1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given a three-digit posi... | [{"type": "stdin_stdout", "input": "575\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "999\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "171\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "123\n", "output": "No\n"}, {"type": "stdin_stdout", "input": "812\n", "output": "No\n"}, {"type... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given a string $s$, cons... | [{"type": "stdin_stdout", "input": "1\n0000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111100\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "1\n0000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111100\n", "output": "NO\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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. Simpson got up with a slight... | [{"type": "stdin_stdout", "input": "a+b+c\n(a+b)+c\na- (b-c)+2\n.\n4ab\n(a - b) (0-b+a) - 1a ^ 2 - b ^ 3\n2 b 2 a\n.\n108 a\n2 2 3 3 3 a\n4 a^1 27\n.\n.", "output": "yes\nno\n.\nno\nyes\n.\nyes\nyes\n.\n"}, {"type": "stdin_stdout", "input": "a+b+c\n(a+b)+c\na- (b-c)+2\n.\n4ab\n(a - b) (0-b+a) - 1a ^ 4 - b ^ 3\n2 b 2 a\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe Berland road network consist... | [{"type": "stdin_stdout", "input": "34 53\n9 6\n25 28\n27 24\n15 18\n34 33\n27 30\n1 4\n4 7\n11 9\n11 8\n30 26\n15 12\n26 23\n17 15\n29 26\n11 15\n7 10\n14 12\n5 9\n8 5\n2 1\n24 21\n3 5\n14 17\n23 20\n25 22\n32 29\n8 6\n3 6\n33 31\n5 2\n21 18\n16 19\n19 22\n17 21\n14 11\n23 27\n3 1\n34 32\n32 30\n26 24\n17 20\n18 20\n2... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nRead problems statements in Mand... | [{"type": "stdin_stdout", "input": "3\n4 7 8\n12 52 56 8\n2 10 2\n21 75\n2 5 8\n10 49", "output": "0\n18\n11\n"}, {"type": "stdin_stdout", "input": "3\n4 7 3\n3 52 56 8\n2 10 2\n21 75\n2 5 8\n10 49", "output": "24\n18\n11\n"}, {"type": "stdin_stdout", "input": "3\n4 7 8\n19 52 56 8\n2 20 2\n21 34\n2 5 8\n10 29", "outpu... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nproblem\n\nGiven the lengths of ... | [{"type": "stdin_stdout", "input": "-23 -12", "output": "-7238.229473871\n"}, {"type": "stdin_stdout", "input": "-26 -9", "output": "-3053.628059289\n"}, {"type": "stdin_stdout", "input": "-74 -8", "output": "-2144.660584851\n"}, {"type": "stdin_stdout", "input": "-11 -4", "output": "-268.082573106\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\nThe purpose of this problem is t... | [{"type": "stdin_stdout", "input": "7 2\n1\n106\n966369\n10\n12\n40177\n11", "output": "3\n"}, {"type": "stdin_stdout", "input": "7 4\n1\n106\n966369\n10\n12\n40177\n11", "output": "1\n"}, {"type": "stdin_stdout", "input": "7 4\n1\n106\n966369\n10\n18\n40177\n11", "output": "0\n"}, {"type": "stdin_stdout", "input": "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\nThere are N points in a D-dimens... | [{"type": "stdin_stdout", "input": "10 10\n8 -14 -14 -20 18 -1 -3 18 -1 10\n-9 2 4 -13 13 5 14 -9 20 -18\n-19 -19 -19 20 -3 20 -2 -18 -7 -11\n5 7 3 -11 12 -9 -10 10 20 -19\n-12 -8 -20 -13 12 13 17 17 -6 0\n-4 -14 -15 -15 18 19 -8 -1 -20 -2\n-7 11 -10 -16 3 -5 -12 15 6 -2\n12 18 -3 -15 -20 17 9 9 10 -10\n10 -2 9 -16 2 1... | code_stdio |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.