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\nA renowned abstract artist Sasha...
[{"type": "stdin_stdout", "input": "-100 -97 20 40\n-151 -97 30 100\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "-123 -29 20 40\n-39 -19 99 100\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "-100 -97 20 40\n-90 -97 30 100\n", "output": "2"}, {"type": "stdin_stdout", "input": "-45 -93 20 40\n-36 -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\nFennec and Snuke are playing a b...
[{"type": "stdin_stdout", "input": "7\n3 6\n1 2\n3 1\n7 4\n5 7\n1 4\n", "output": "Fennec\n"}, {"type": "stdin_stdout", "input": "7\n3 6\n2 2\n3 1\n7 4\n5 7\n1 4", "output": "Fennec\n"}, {"type": "stdin_stdout", "input": "7\n3 6\n2 2\n3 1\n7 4\n4 7\n1 4", "output": "Fennec\n"}, {"type": "stdin_stdout", "input": "7\n3 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\nConsider the following equation:...
[{"type": "stdin_stdout", "input": "14\n", "output": " 373391776\n"}, {"type": "stdin_stdout", "input": "38\n", "output": " 90046024\n"}, {"type": "stdin_stdout", "input": "25\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\nProblem statement\n\nThere is a ...
[{"type": "stdin_stdout", "input": "4\n-1 2\n12 0\n1 -3\n3 13", "output": "-39\n"}, {"type": "stdin_stdout", "input": "4\n-2 4\n7 1\n-1 8\n2 25", "output": "-25\n"}, {"type": "stdin_stdout", "input": "4\n-1 -2\n2 3\n3 2\n2 22", "output": "-28\n"}, {"type": "stdin_stdout", "input": "4\n-1 -2\n2 5\n3 2\n2 22", "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\nMarcin is a coach in his univers...
[{"type": "stdin_stdout", "input": "10\n206158430208 206162624513 68719476737 137506062337 206162624513 4194305 68719476737 206225539072 137443147777 109376694609\n202243898 470292528 170057449 290025540 127995253 514454151 607963029 768676450 611202521 68834463\n", "output": "2704208829\n"}, {"type": "stdin_stdout", "...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nOnce upon a time in the Kingdom ...
[{"type": "stdin_stdout", "input": "1256336691\n", "output": "2931452299 10050693537\n"}, {"type": "stdin_stdout", "input": "1359531323\n", "output": "6797656627 10876250593\n"}, {"type": "stdin_stdout", "input": "1544906479\n", "output": "1581910903 12359251841\n"}, {"type": "stdin_stdout", "input": "1278463385\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\nRecently, on the course of algor...
[{"type": "stdin_stdout", "input": "71 57\n9 26 80 2 65 60 63 1 15 109 114 1 58 27 41 97 42 9 42 56 87 22 10 28 34 90 13 70 71 56 65 21 0 78 47 96 56 77 32 83 28 16 10 41 0 18 118 12 27 112 4 67 21 41 111 20 21 52 74 10 83 74 43 123 2 15 0 63 68 7 72\n81\n47\n81\n81\n5\n9\n41\n76\n81\n92\n95\n94\n78\n93\n47\n30\n152\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\nWrite a function which takes a n...
[{"input": "34", "output": "[\"\\\"\"]", "fn_name": "get_char"}, {"input": "65", "output": "[\"A\"]", "fn_name": "get_char"}, {"input": "33", "output": "[\"!\"]", "fn_name": "get_char"}, {"input": "35", "output": "[\"#\"]", "fn_name": "get_char"}, {"input": "36", "output": "[\"$\"]", "fn_name": "get_char"}, {"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\nYou are an environmental activis...
[{"type": "stdin_stdout", "input": "4\n1\n100\n50 2\n49 1\n100\n8\n100 200 100 200 100 200 100 100\n16 2\n15 3\n107\n3\n1000000000 1000000000 1000000000\n50 1\n50 1\n4850788900\n5\n200 100 100 100 100\n105 5\n31 1\n90\n", "output": "-1\n6\n-1\n2\n"}, {"type": "stdin_stdout", "input": "4\n1\n100\n50 2\n49 1\n100\n8\n100...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 been in love with Coronav...
[{"type": "stdin_stdout", "input": "48 14\n1 1 1 1 1 6 1 1 1 1 1 1 3 3 1 1 1 1 1 2 2 2 1 1 1 1 1 1 2 1 4 1 1 1 1 1 1 1 1 1 1 7 1 1 1 1 1 5\n", "output": "42\n"}, {"type": "stdin_stdout", "input": "48 14\n1 1 1 1 1 6 1 1 1 1 1 1 3 3 1 1 2 1 1 2 2 2 1 1 1 1 1 1 2 1 4 1 1 1 1 1 1 1 1 1 1 7 1 1 1 1 1 5\n", "output": "42\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\nImagine that there is a group of...
[{"type": "stdin_stdout", "input": "100 48\n1 56 6\n2 42 3\n3 52 1\n9 26 8\n10 96 8\n11 39 2\n12 51 6\n12 68 7\n13 40 5\n14 18 10\n14 70 6\n15 37 8\n15 38 8\n15 82 6\n15 85 5\n16 48 3\n16 50 9\n16 71 9\n17 18 3\n17 100 10\n20 73 3\n22 32 9\n22 89 9\n23 53 3\n24 53 1\n27 78 10\n30 50 5\n33 94 8\n34 87 9\n35 73 3\n36 51 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 Snuke Cats numbered ...
[{"type": "stdin_stdout", "input": "4\n141 1 -1 2", "output": "-4 -144 142 -141\n"}, {"type": "stdin_stdout", "input": "4\n102 2 -1 2", "output": "-1 -101 102 -101\n"}, {"type": "stdin_stdout", "input": "4\n102 2 -1 1", "output": "-4 -104 101 -101\n"}, {"type": "stdin_stdout", "input": "4\n13 -17 0 0", "output": "-17 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\nSomething happened in Uzhlyandia...
[{"type": "stdin_stdout", "input": "100\n23 64 60 -45 -36 -64 -59 15 -75 69 -30 -7 -20 17 -77 58 93 -76 -98 -22 -31 16 -50 6 -20 -85 1 64 -88 -8 -15 -6 -57 25 91 10 2 -90 74 -66 -42 73 28 49 -85 59 96 79 -25 49 -59 -89 -75 12 -96 -33 -65 -8 -100 -81 17 99 -91 -5 7 -21 1 85 63 86 -26 85 -31 11 -75 35 -82 15 98 93 -55 66...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nRamesses came to university to a...
[{"type": "stdin_stdout", "input": "10 10\n1 1 1 0 1 1 0 0 0 1\n1 1 1 1 0 0 0 0 0 1\n0 1 0 0 0 0 0 0 1 0\n0 0 0 0 0 1 0 0 0 0\n0 1 1 1 0 1 1 1 0 0\n0 0 0 1 1 1 0 1 0 0\n0 0 0 0 1 1 0 0 1 1\n0 0 0 1 1 0 1 1 1 1\n1 1 0 1 1 0 1 1 0 0\n1 0 0 0 0 0 0 0 1 0\n0 1 0 1 0 1 1 1 0 0\n0 1 1 0 0 0 0 0 0 1\n0 1 0 0 0 1 0 0 0 0\n0 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\nNew Year is coming in Tree World...
[{"type": "stdin_stdout", "input": "10\n1 2 938\n1 6 23\n1 10 727\n1 9 814\n9 5 644\n8 5 39\n2 7 999\n1 3 666\n5 4 577\n10\n9 1099\n5 64\n4 318\n3 373\n4 548\n7 219\n5 43\n5 27\n3 155\n8 359\n", "output": "5336.333333333333\n4524.333333333333\n3730.733333333333\n3518.3333333333335\n3886.3333333333335\n3418.333333333333...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nOn March 14, the day of the numb...
[{"type": "stdin_stdout", "input": "9\n000\n3\n4141592653\n141592653589793238462643383279\n31420\n31415\n314159265358\n27182\n314159265358979323846264338327\n", "output": "0\n1\n0\n0\n3\n5\n12\n0\n30\n"}, {"type": "stdin_stdout", "input": "3\n314\n315\n314\n", "output": "3\n2\n3\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\nShubham has an array $a$ of size...
[{"type": "stdin_stdout", "input": "4\n3 1\n16 11 12\n10 3\n13 12 9 1 9 8 4 19 16 19\n3 2\n3 2 6\n9 7\n11 14 1 6 3 12 3 20 16\n", "output": "Yes\nYes\nYes\nYes\n"}, {"type": "stdin_stdout", "input": "4\n3 1\n16 11 12\n10 3\n13 12 9 1 9 8 4 19 16 19\n3 2\n3 2 6\n9 7\n11 14 1 6 3 12 3 20 16\n", "output": "YES\nYES\nYES\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\nThis problem consists of three s...
[{"type": "stdin_stdout", "input": "40 3\n1 62395\n5 40319\n4 165445\n10 137479\n10 47829\n8 9741\n5 148106\n10 25494\n10 162856\n2 106581\n0 194523\n9 148086\n1 100862\n6 147600\n6 107486\n6 166873\n7 16721\n4 22192\n0 8827\n1 197146\n10 8949\n0 150443\n9 148348\n3 143935\n1 139371\n7 128821\n10 107760\n4 141821\n1 35...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWith the motto \"Creating your o...
[{"type": "stdin_stdout", "input": "-1 -2 9 6\n3 -2 7 6\n-1 0 9 0\n2 2 0 -1\n1 2 2 0\n-3 -1 3 1\n0 0 0 0", "output": "syo-kichi\nsyo-kichi\n"}, {"type": "stdin_stdout", "input": "-1 -2 22 6\n3 -2 7 10\n-1 0 9 0\n3 2 0 -1\n1 1 2 1\n-3 -1 3 1\n0 0 0 0", "output": "syo-kichi\nkyo\n"}, {"type": "stdin_stdout", "input": "-1...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given a 4-character stri...
[{"type": "stdin_stdout", "input": "ASSA\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "FFEE\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "AVVA\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "HHTT\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "ILIL\n", "output": "Yes\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\nUnlike Knights of a Round Table,...
[{"type": "stdin_stdout", "input": "11 10\n1 2 3 4 5 6 7 8 9 10 11\n1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000\n", "output": "1000000000 2000000000 3000000000 4000000000 5000000000 6000000000 7000000000 8000000000 9000000000 10000000000 11000...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 tree T with N vertice...
[{"type": "stdin_stdout", "input": "10\n2 4\n2 5\n8 3\n10 7\n1 7\n2 8\n9 10\n8 6\n10 8", "output": "220\n"}, {"type": "stdin_stdout", "input": "10\n1 4\n2 5\n1 3\n10 1\n1 6\n4 8\n9 8\n7 10\n10 2", "output": "122\n"}, {"type": "stdin_stdout", "input": "10\n2 4\n2 5\n2 3\n10 7\n1 6\n2 10\n9 5\n8 7\n10 6", "output": "194\...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn this Kata, you will be given ...
[{"input": "\"gh12cdy695m1\"", "output": "[695]", "fn_name": "solve"}, {"input": "\"vih61w8oohj5\"", "output": "[61]", "fn_name": "solve"}, {"input": "\"f7g42g16hcu5\"", "output": "[42]", "fn_name": "solve"}, {"input": "\"2ti9iei7qhr5\"", "output": "[9]", "fn_name": "solve"}, {"input": "\"lu1j8qbbb85\"", "output": "[85...
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 the most hotly anticipated ...
[{"input": "[100, \"yes\"]\n[100, \"no\"]", "output": "[\"Gryffindor wins!\"]", "fn_name": "game_winners"}, {"input": "[350, \"no\"]\n[250, \"yes\"]", "output": "[\"Slytherin wins!\"]", "fn_name": "game_winners"}, {"input": "[100, \"yes\"]\n[250, \"no\"]", "output": "[\"It's a draw!\"]", "fn_name": "game_winners"}, {"i...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAs you very well know, the whole...
[{"type": "stdin_stdout", "input": "1\n1000 1010 1000\n", "output": "0.33222591362126247 0.33554817275747506 0.33222591362126247\n"}, {"type": "stdin_stdout", "input": "1\n1000 1011 1000\n", "output": "0.33211557622052473 0.33576884755895053 0.33211557622052473\n"}, {"type": "stdin_stdout", "input": "1000\n1319 1000 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\nRational numbers are numbers rep...
[{"type": "stdin_stdout", "input": "2 10\n5 10\n19 111\n0 0", "output": "10/7 7/5\n9/4 2/1\n109/25 61/14\n"}, {"type": "stdin_stdout", "input": "11 5\n10 10\n5 100\n0 0", "output": "4/1 3/1\n10/3 3/1\n85/38 38/17\n"}, {"type": "stdin_stdout", "input": "2 5\n3 14\n26 111\n0 0", "output": "3/2 4/3\n7/4 12/7\n51/10 107/21...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 lighthouse keeper Peter comman...
[{"type": "stdin_stdout", "input": "80\n0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n", "output": "1776 1805 1832 1857 1880 1901 1920 1937 1953 1967 1980 1991 2001 2009 2016 2021 2025 2027 2028 2028 2028 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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's new hobby is painting, bu...
[{"type": "stdin_stdout", "input": "3\n4\n1 5 5 5\n4\n1 1 1 5\n3\n5 5 2\n\n", "output": "Yes\nYes\nNo\n"}, {"type": "stdin_stdout", "input": "3\n4\n1 6 4 -2\n0\n0 9 -1 10\n0\n-1 3 6", "output": "No\nNo\nNo\n"}, {"type": "stdin_stdout", "input": "3\n4\n1 6 4 0\n0\n-1 9 -1 10\n0\n-1 3 6", "output": "No\nNo\nNo\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\nMr. Takahashi has a string s con...
[{"type": "stdin_stdout", "input": "codefestival\n101", "output": "aaaafeaaiaal\n"}, {"type": "stdin_stdout", "input": "cdoeffstival\n101", "output": "aaaaffaaiaal\n"}, {"type": "stdin_stdout", "input": "cdoeffstival\n111", "output": "aaaaafativam\n"}, {"type": "stdin_stdout", "input": "lavitsffeodc\n111", "output": "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\nIt is only six months until Chri...
[{"type": "stdin_stdout", "input": "8\n121 1 -1 -1 -3 3 0 1", "output": "124\n"}, {"type": "stdin_stdout", "input": "8\n0 -4 -1 21 -2 -15 4 2", "output": "36\n"}, {"type": "stdin_stdout", "input": "8\n0 -3 -1 27 -6 -18 4 2", "output": "45\n"}, {"type": "stdin_stdout", "input": "8\n-2 -1 0 1 3 -143 0 1", "output": "146\...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nInna is a great piano player and...
[{"type": "stdin_stdout", "input": "10\n2 2 2 4 10 6 7 16 9 17\n1 2 3 5 5 6 7 8 18 10\n", "output": "157\n"}, {"type": "stdin_stdout", "input": "10\n1 2 0 4 10 4 7 16 9 17\n1 2 3 5 5 6 7 8 18 10\n", "output": "154\n"}, {"type": "stdin_stdout", "input": "10\n1 2 2 4 10 6 7 16 9 17\n1 2 3 5 5 6 7 8 18 10\n", "output": "1...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\n# Don't give me five!\n\nIn this...
[{"input": "-14\n-1", "output": "[13]", "fn_name": "dont_give_me_five"}, {"input": "-4\n17", "output": "[20]", "fn_name": "dont_give_me_five"}, {"input": "-4\n37", "output": "[38]", "fn_name": "dont_give_me_five"}, {"input": "-14\n-6", "output": "[9]", "fn_name": "dont_give_me_five"}, {"input": "4\n17", "output": "[12]...
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\nIvan wants to make a necklace as...
[{"type": "stdin_stdout", "input": "20\n19259 5236 2272 7238 560 938 6209 91 1540 2821 35 6097 12593 1092 6181 7553 4095 280 12810 2723\n", "output": "0\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nMany years have passed, and n fr...
[{"type": "stdin_stdout", "input": "10\n489 685\n857 870\n736 221\n687 697\n166 360\n265 200\n738 519\n393 760\n66 176\n798 160\n", "output": "3231747\n"}, {"type": "stdin_stdout", "input": "10\n489 685\n857 870\n736 221\n687 697\n166 360\n265 200\n738 519\n393 760\n66 176\n798 160\n", "output": "3231747\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\nInternational Car Production Com...
[{"type": "stdin_stdout", "input": "1 1\n180 253 3\n1 1\n180 180 19\n2 10\n694 -351 7\n-24 360 8\n3 2\n100 60 2\n-72 -72 10\n-59 -413 5\n0 0", "output": "-7.91148452\n5.59128446\n0.00000000\n59.69026042\n-16.09771605\n5.86169674\n-6.89851214\n-10.76376689\n"}, {"type": "stdin_stdout", "input": "1 2\n180 253 2\n1 2\n180...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nNadeko's birthday is approaching...
[{"type": "stdin_stdout", "input": "100\ndddddccccdddddaaaaabbbbbbbbbbbbbaaacdcabbacccacccccbdbbadddbbddddbdaaccacdddbbbaddddbbbbdcbbbdddddda\n50\n54 b\n48 d\n45 b\n52 c\n52 a\n48 a\n54 b\n45 a\n47 d\n50 d\n53 a\n34 a\n51 b\n48 d\n47 d\n47 a\n48 d\n53 b\n52 d\n54 d\n46 a\n38 a\n52 b\n49 a\n49 b\n46 c\n99 a\n45 b\n35 c\...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe Dogeforces company has $k$ e...
[{"type": "stdin_stdout", "input": "9\n98 100 100 100 100 100 100 99 100\n100 96 100 100 99 100 100 100 97\n100 100 98 99 100 100 100 100 100\n100 100 99 97 100 100 100 100 100\n100 99 100 100 98 100 100 100 99\n100 100 100 100 100 97 98 100 100\n100 100 100 100 100 98 97 100 100\n99 100 100 100 100 100 100 98 100\n100...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 we all know, Max is the best ...
[{"type": "stdin_stdout", "input": "100 1\n92 93 p\n", "output": "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB\nBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB\nBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAutumn came late to the kingdom ...
[{"type": "stdin_stdout", "input": "9 9\n", "output": "13\nAAA.BCCC.\n.ABBB.CD.\n.AE.BFCD.\nEEEFFFDDD\nG.E.HFIII\nGGGJHHHI.\nGK.JHL.IM\n.KJJJLMMM\nKKK.LLL.M\n"}, {"type": "stdin_stdout", "input": "9 8\n", "output": "12\nAAA.BCCC\n.ABBBDC.\nEA.FBDC.\nEEEFDDDG\nEHFFFGGG\n.HHHIIIG\nJHKKKIL.\nJJJK.IL.\nJ..K.LLL\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\nTake 2 strings `s1` and `s2` inc...
[{"input": "\"loopingisfunbutdangerous\"\n\"lessdangerousthancoding\"", "output": "[\"abcdefghilnoprstu\"]", "fn_name": "longest"}, {"input": "\"agenerationmustconfrontthelooming\"\n\"codewarrs\"", "output": "[\"acdefghilmnorstuw\"]", "fn_name": "longest"}, {"input": "\"inmanylanguages\"\n\"theresapairoffunctions\"", "...
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\nEmuskald is a well-known illusio...
[{"type": "stdin_stdout", "input": "15\n999999986 268435456\n999999987 67108864\n999999988 16777216\n999999989 4194304\n999999990 1048576\n999999991 262144\n999999992 65536\n999999993 16384\n999999994 4096\n999999995 1024\n999999996 256\n999999997 64\n999999998 16\n999999999 4\n1000000000 1\n", "output": "1000000001\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\nMasha wants to open her own bake...
[{"type": "stdin_stdout", "input": "8 57 3\n1 3 15\n2 3 1\n1 7 21\n1 2 11\n2 1 16\n1 6 4\n1 3 2\n3 7 17\n5 8 3\n1 3 18\n1 4 3\n1 2 1\n2 8 14\n1 4 17\n4 5 21\n2 3 6\n3 5 11\n2 8 11\n3 4 1\n1 3 9\n1 4 3\n2 3 12\n1 5 9\n2 3 15\n1 2 14\n1 2 10\n1 4 19\n5 7 7\n5 8 20\n5 8 1\n1 4 3\n4 5 8\n5 7 1\n1 2 14\n4 5 9\n6 7 2\n2 6 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\n# Task\n\nYou are given a functi...
[{"input": "[1, 4, 64, 68, 67, 23, 1]", "output": "[\"14*6*4*6*8*67231\"]", "fn_name": "asterisc_it"}, {"input": "9682135", "output": "[\"96*8*2135\"]", "fn_name": "asterisc_it"}, {"input": "5312708", "output": "[\"531270*8\"]", "fn_name": "asterisc_it"}, {"input": "\"0000\"", "output": "[\"0*0*0*0\"]", "fn_name": "ast...
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\nVasya has the sequence consistin...
[{"type": "stdin_stdout", "input": "100 14\n8192 8192 8192 8192 8191 8192 8192 8192 8192 8192 8191 8191 8191 8192 8191 8191 8191 8192 8192 8192 8192 8192 8191 8191 8191 8192 8191 8192 8192 8192 8192 8192 8192 8191 8191 8192 8192 8191 8191 8192 8192 8192 8191 8191 8192 8191 8191 8191 8191 8191 8191 8192 8191 8191 8192 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\nMusicians of a popular band \"Fl...
[{"type": "stdin_stdout", "input": "7 7\n1 6 745325\n2 3 3581176\n2 4 19\n3 6 71263060078\n5 4 141198\n7 4 163953\n5 6 15994\n1 297404206755 82096176217 14663411 187389745 21385 704393\n", "output": "1 335807 7498159 335769 53373 21385 663675 \n"}, {"type": "stdin_stdout", "input": "7 7\n1 6 745325\n2 3 3581176\n2 4 19...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 battling Shikamaru, Tayuya...
[{"type": "stdin_stdout", "input": "58260522 77914575 2436426 24979445 61648772 23690081\n10\n582107247 906728404 411434947 673536177 411497300 488012525 561127307 800305059 992325267 112738006\n", "output": "804109112\n"}, {"type": "stdin_stdout", "input": "58260522 77914575 2436426 24979445 61648772 23690081\n10\n582...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 employees working in...
[{"type": "stdin_stdout", "input": "2 10\n2 2\n1 2 1\n3 1 1\n3 2 1\n3 1 1\n2 2\n3 1 2\n3 1 1\n3 2 1\n3 1 2\n", "output": "NO\nYES\nNO\nYES\nNO\nYES\nYES\n"}, {"type": "stdin_stdout", "input": "2 10\n2 2\n1 2 1\n3 1 1\n3 1 1\n3 1 1\n2 2\n3 1 2\n3 1 1\n3 2 1\n3 1 2\n", "output": "NO\nNO\nNO\nYES\nNO\nYES\nYES\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 four integers $n$,...
[{"type": "stdin_stdout", "input": "2\n100000 1000000000 1000000000 1\n100000 1 1000000000 10000\n", "output": "99995000050000\n-50000500000000\n"}, {"type": "stdin_stdout", "input": "7\n1 1 1 1\n2 2 2 2\n3 3 3 3\n4 4 4 4\n5 5 5 5\n6 6 6 6\n7 7 7 7\n", "output": "1\n2\n6\n8\n15\n18\n28\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\nПамять компьютера состоит из n я...
[{"type": "stdin_stdout", "input": "24\n0 0 6 6 6 0 22 22 0 23 23 0 19 19 19 19 0 0 17 0 0 3 3 3\n", "output": "14\n"}, {"type": "stdin_stdout", "input": "21\n0 11 11 11 11 0 7 0 12 12 12 12 12 0 19 19 19 0 1 1 1\n", "output": "11\n"}, {"type": "stdin_stdout", "input": "24\n6 6 0 0 0 22 0 0 23 0 0 19 0 0 0 0 17 17 0 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\nCreate a function `close_compare...
[{"input": "1.99\n5\n3", "output": "[-1]", "fn_name": "close_compare"}, {"input": "8.1\n5\n3", "output": "[1]", "fn_name": "close_compare"}, {"input": "2\n5\n3", "output": "[0]", "fn_name": "close_compare"}, {"input": "5\n5\n3", "output": "[0]", "fn_name": "close_compare"}, {"input": "8\n5\n3", "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\nLet's imagine: there is a chess ...
[{"type": "stdin_stdout", "input": "1000000 1000000\n", "output": "1000000\n"}, {"type": "stdin_stdout", "input": "666667 1000000\n", "output": "333334\n"}, {"type": "stdin_stdout", "input": "871866 348747\n", "output": "174374\n"}, {"type": "stdin_stdout", "input": "863029 287677\n", "output": "287677\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\nPanic is rising in the committee...
[{"type": "stdin_stdout", "input": "27\nmnpsweykjdvaxyiqtgcuzhbfrlo\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "27\nabcdefghijklmnopqrstuvwxyza\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "27\nabcdefghijklmnopqrstuvwxyza\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "27\nmnpswey...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nPetya loves hockey very much. On...
[{"type": "stdin_stdout", "input": "100\nqn\nBE\nyN\nep\nPq\nXz\nLM\nEZ\ndb\nMn\nbn\nFe\nqA\nzc\nyq\npC\nyA\nWk\nYq\nrs\noD\nvD\nzW\nxZ\nbl\nur\nkf\ndf\nLS\nUW\nMy\nhR\nsh\nNh\nog\nCW\nor\nzo\nrO\nao\nXH\nDq\nKa\nlL\nYQ\nOh\nRZ\nAx\nta\nko\nDn\nNg\nNy\nDB\nYD\njO\nAp\nFT\noB\nNc\nwB\nHO\neW\nAc\nDr\nMt\nDf\nbF\nFP\nRa\...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 containing hashe...
[{"input": "[{\"name\": \"Bart\"}, {\"name\": \"Lisa\"}, {\"name\": \"Maggie\"}, {\"name\": \"Homer\"}, {\"name\": \"Marge\"}]", "output": "[\"Bart, Lisa, Maggie, Homer & Marge\"]", "fn_name": "namelist"}, {"input": "[{\"name\": \"Bart\"}, {\"name\": \"Lisa\"}, {\"name\": \"Maggie\"}]", "output": "[\"Bart, Lisa & Maggi...
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 directed graph c...
[{"type": "stdin_stdout", "input": "3 11\n+ 1 2 a\n+ 1 3 c\n+ 3 2 a\n+ 2 1 a\n? 6\n? 5\n- 2 1\n- 3 2\n+ 2 1 c\n+ 3 2 d\n? 5\n", "output": "YES\nYES\nYES\n"}, {"type": "stdin_stdout", "input": "3 11\n+ 1 2 a\n+ 1 3 c\n+ 3 2 a\n+ 2 1 a\n? 6\n? 5\n- 2 1\n- 3 2\n+ 2 1 c\n+ 3 3 d\n? 5\n", "output": "YES\nYES\nYES\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\nVera adores poems. All the poems...
[{"type": "stdin_stdout", "input": "7 3\nferwljzwakxedlgwl\noerwljzwakxedlgwl\nhyqombizhuhxedprb\netptjrizhuhxedprb\nurtuckar\ndkartmwramklcmi\nrurtuckar\nnurartmwramklcmi\niraziomsv\nsaziomsv\nbprapiqpayzurgij\nusyemayzurgij\nztstmeecvmkvuu\nquexlecvmkvuu\nrlhwecvmkvuu\nzecvmkvuu\niikymgbncljtub\nqiikymgbncljtub\nbcav...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nStory\nJumbo Juice makes a fresh...
[{"input": "[\"blackBerry\", \"coconut\", \"avocado\"]", "output": "[8]", "fn_name": "mix_fruit"}, {"input": "[\"BlACKbeRrY\", \"cOcONuT\", \"avoCaDo\"]", "output": "[8]", "fn_name": "mix_fruit"}, {"input": "[\"watermelon\", \"cherry\", \"avocado\"]", "output": "[8]", "fn_name": "mix_fruit"}, {"input": "[\"watermelon\"...
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\nMost of this problem is by the o...
[{"input": "1073741823", "output": "[false]", "fn_name": "polydivisible"}, {"input": "381654729", "output": "[true]", "fn_name": "polydivisible"}, {"input": "123220", "output": "[false]", "fn_name": "polydivisible"}, {"input": "1020005", "output": "[true]", "fn_name": "polydivisible"}, {"input": "9876545", "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\nBerland Football Cup starts real...
[{"type": "stdin_stdout", "input": "500000000001 1000000000000 100 100\n", "output": "49999999999900\n"}, {"type": "stdin_stdout", "input": "500000000001 1000000000000 100 100\n", "output": "49999999999900\n"}, {"type": "stdin_stdout", "input": "500000000001 1000000000000 110 100\n", "output": "50000000000100\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\nSpoonerize... with numbers... nu...
[{"input": "[1000000, \"hello\"]", "output": "[\"invalid array\"]", "fn_name": "noonerize"}, {"input": "[\"pippi\", 9999999]", "output": "[\"invalid array\"]", "fn_name": "noonerize"}, {"input": "[\"pippi\", \"hello\"]", "output": "[\"invalid array\"]", "fn_name": "noonerize"}, {"input": "[1000000, 9999999]", "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\nFrom the FAQ:\n\nWhat am I allow...
[{"type": "stdin_stdout", "input": "7\n1\n?\n2\n0?\n11\n69259?087\n4\n??\n2\n0?1\n4\n?????\n3\n22", "output": "0\n01\n692591087\n01\nNO\n01012\nNO\n"}, {"type": "stdin_stdout", "input": "7\n1\n?\n2\n0?\n11\n69259?087\n4\n??\n2\n0?1\n4\n?????\n3\n15", "output": "0\n01\n692591087\n01\nNO\n01012\n15\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\nDaniel is watching a football te...
[{"type": "stdin_stdout", "input": "1\n200\n5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 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\nHakone Ekiden is one of the Japa...
[{"type": "stdin_stdout", "input": "10\nU\nD\nU\nD\nU\nD\nU\nD\nU\nD", "output": "608"}, {"type": "stdin_stdout", "input": "8\nT\nD\nD\nD\nD\nD\nD\nC", "output": "0\n"}, {"type": "stdin_stdout", "input": "8\nT\nD\nD\nD\nD\nD\nC\nC", "output": "0\n"}, {"type": "stdin_stdout", "input": "8\nT\nD\nD\nD\nD\nE\nC\nC", "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\nFor an integer N, we will choose...
[{"type": "stdin_stdout", "input": "1000000000\n", "output": "499999999500000000\n"}, {"type": "stdin_stdout", "input": "999999999\n", "output": "499999998500000001\n"}, {"type": "stdin_stdout", "input": "999999998\n", "output": "499999997500000003\n"}, {"type": "stdin_stdout", "input": "234679769\n", "output": "275372...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nPetya loves lucky numbers. Every...
[{"type": "stdin_stdout", "input": "1000000000\n", "output": "4444477777\n"}, {"type": "stdin_stdout", "input": "1000100000\n", "output": "4444477777\n"}, {"type": "stdin_stdout", "input": "1211766791\n", "output": "4444477777\n"}, {"type": "stdin_stdout", "input": "1101704081\n", "output": "4444477777\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\nLet S(n) denote the sum of the d...
[{"type": "stdin_stdout", "input": "792\n", "output": "1\n2\n3\n4\n5\n6\n7\n8\n9\n19\n29\n39\n49\n59\n69\n79\n89\n99\n199\n299\n399\n499\n599\n699\n799\n899\n999\n1099\n1199\n1299\n1399\n1499\n1599\n1699\n1799\n1899\n1999\n2999\n3999\n4999\n5999\n6999\n7999\n8999\n9999\n10999\n11999\n12999\n13999\n14999\n15999\n16999\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've just recently been hired ...
[{"input": "[15, 20, 30, 31, 32, 44, 100]", "output": "[0]", "fn_name": "score_throws"}, {"input": "[1, 2, 3, 4, 5, 6, 7, 8, 9]", "output": "[65]", "fn_name": "score_throws"}, {"input": "[0, 5, 10, 10.5, 4.5]", "output": "[30]", "fn_name": "score_throws"}, {"input": "[1, 2, 3, 4]", "output": "[140]", "fn_name": "score_...
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\nDuring the lunch break all n Ber...
[{"type": "stdin_stdout", "input": "10\n419946 201769\n245945 0\n842799 113073\n836998 245945\n0 794376\n692107 836998\n113073 904403\n904403 987165\n201769 692107\n794376 842799\n", "output": "419946 794376 201769 842799 692107 113073 836998 904403 245945 987165 \n"}, {"type": "stdin_stdout", "input": "10\n419946 2017...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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_1, a_2...
[{"type": "stdin_stdout", "input": "3\n1\n7\n4\n1 1 3 5\n6\n3 2 1 5 6 4\n", "output": "7\n5 3 1 1\n6 5 4 3 2 1\n"}, {"type": "stdin_stdout", "input": "3\n1\n7\n4\n1 1 3 5\n6\n3 2 1 5 6 4\n", "output": "7\n5 3 1 1\n6 5 4 3 2 1\n"}, {"type": "stdin_stdout", "input": "3\n1\n7\n4\n0 1 3 5\n6\n3 2 1 5 6 4\n", "output": "7\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 a coordinate system,There are...
[{"type": "stdin_stdout", "input": "10\n44 89 20 54 87 61\n65 25 84 82 78 98\n62 115 111 81 47 101\n73 22 24 111 56 47\n115 38 36 41 102 112\n32 89 58 91 46 67\n31 23 114 55 119 87\n31 61 84 93 53 42\n77 82 64 67 88 73\n98 49 61 43 79 57", "output": "YES\nNO\nNO\nYES\nNO\nNO\nNO\nNO\nNO\nYES"}, {"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\nVanya and his friend Vova play a...
[{"type": "stdin_stdout", "input": "20 6 15\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n35\n36\n37\n38\n39\n", "output": "Both\nBoth\nVova\nVova\nVanya\nVova\nVova\nBoth\nBoth\nVova\nVova\nVanya\nVova\nVova\nBoth\nBoth\nVova\nVova\nVanya\nVova\n"}, {"type": "stdin_stdout", "input": "20 5 15\n20\n21\n22...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 will deal wi...
[{"type": "stdin_stdout", "input": "50\n01110100101100100100011001100001110010010000000101\n50\n27 18 7\n22 35 2\n50 35 1\n41 16 1\n27 5 5\n11 6 33\n7 19 2\n9 12 33\n14 37 4\n1 22 8\n22 3 5\n50 42 1\n50 38 1\n29 20 2\n20 34 17\n20 4 29\n16 21 3\n11 43 3\n15 45 1\n12 28 3\n31 34 13\n43 1 8\n3 41 1\n18 3 13\n29 44 6\n47 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 category page displays a set n...
[{"input": "43\n15\n3456", "output": "[\"Showing 631 to 645 of 3456 Products.\"]", "fn_name": "pagination_text"}, {"input": "2\n30\n350", "output": "[\"Showing 31 to 60 of 350 Products.\"]", "fn_name": "pagination_text"}, {"input": "3\n10\n26", "output": "[\"Showing 21 to 26 of 26 Products.\"]", "fn_name": "pagination_...
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# Description:\n\n Find the long...
[{"input": "\"!!???!?????\"", "output": "[\"!?????\"]", "fn_name": "find"}, {"input": "\"!????!!!?\"", "output": "[\"????!!!\"]", "fn_name": "find"}, {"input": "\"!!???!????\"", "output": "[\"!!???\"]", "fn_name": "find"}, {"input": "\"!?!!??!!!?\"", "output": "[\"??!!!\"]", "fn_name": "find"}, {"input": "\"!?!!\"", "o...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA subsequence of length |x| of s...
[{"type": "stdin_stdout", "input": "ctkhagrifaztmnxhmqztzibnmzzkojiztvrkfeoqegvwtbxlvvjhebshqaicsovtkcdovytimjggglyxlvglgunbohnkxargymbqvzgsnvjzgxivdgnaesgxqcruaopjuqsyyorrobnelehjnxcetveehlbmeskptivsuhuqupbieumycwczxyqjtwfofehfkpqmjngygwxkaviuyouiippgvlxjgtkxmhcwtzacbllsybgiujyryngapfwjkkyapfgxtcdpc\nctkhagrifaztmnxhm...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nNukes has an integer that can be...
[{"type": "stdin_stdout", "input": "271828182845904523\n1128816364578546661", "output": "881093321760942453\n"}, {"type": "stdin_stdout", "input": "271828182845904523\n1080587834201094862", "output": "881093321760942453\n"}, {"type": "stdin_stdout", "input": "271828182845904523\n1104519973481288013", "output": "8810933...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 ancient Berlanders believed ...
[{"type": "stdin_stdout", "input": "50\nagecd\ncghafi\nfiide\niecc\njbdcfjhgd\ndiee\nhfeg\nehc\ngfijgjh\ngacaifebg\ndicbbddc\nhjgciaei\njjcdh\ng\ngc\ncf\nhfdjhd\nc\nicidbec\nji\neeh\ncgeejggc\nacfd\njjg\najefdj\neghhebiic\nbih\ngbb\njjaa\nidc\ngafi\necg\ndbigbjiehj\ncedif\nahidfaaajg\nhfhhiccbgb\ndgegjgieif\nhgjebhfdc\...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 positive integer se...
[{"type": "stdin_stdout", "input": "23\n26988535 53977070 107954140 161931210 323862420 215908280 431816560 647724840 269885350 242896815 755678980 485793630 863633120 404828025 539770700 134942675 593747770 377839490 917610190 809656050 620736305 971587260 458805095\n", "output": "7\n"}, {"type": "stdin_stdout", "inpu...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe surveyor starship Hakodate-m...
[{"type": "stdin_stdout", "input": "100\n160\n50\n20\n150323\n0", "output": "99\n160\n47\n20\n150303\n"}, {"type": "stdin_stdout", "input": "100\n31\n37\n104\n151200\n0", "output": "99\n31\n37\n99\n151200\n"}, {"type": "stdin_stdout", "input": "100\n84\n50\n20\n151200\n0", "output": "99\n84\n47\n20\n151200\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\nAs you might remember, the colle...
[{"type": "stdin_stdout", "input": "5 6 5\n23\n30\n42\n57\n90\n21 \n23 \n35 \n57 \n90 \n92 \n21 \n23 \n30 \n57 \n90 ", "output": "5\n21 \n23 \n30 \n57 \n90"}, {"type": "stdin_stdout", "input": "5 6 5\n23\n30\n37\n57\n90\n21 \n23 \n35 \n57 \n90 \n92 \n21 \n23 \n30 \n57 \n174", "output": "5\n21\n23\n30\n57\n90\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\nHeading ##There are two integers...
[{"type": "stdin_stdout", "input": "124\n1476395008 1493172223\n1275068416 1291845631\n4009754624 4026531839\n2516582400 2533359615\n50331648 67108863\n2566914048 2583691263\n2952790016 2969567231\n3892314112 3909091327\n3489660928 3506438143\n33554432 50331647\n1694498816 1711276031\n3623878656 3640655871\n1308622848 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 ACM ICPC judges are very car...
[{"type": "stdin_stdout", "input": "8\n1 1 1 1 1 1 2 1 8\n3 2 3 2 3 2 4 2 10\n6 4 7 13 7 b a 2 2e\ne1 13 ce 28 ca 6 ab 46 a5d\nb08 49e2 6128 f27 8cf2 bc50 7380 7fe1 722b\n4eba eb4 a352 fd14 6ac1 fed1 dd06 bb83 392bc\nef593c08 847e522f c9b20c47 26f3a4e1 e2720a01 6fe66007\n7a4e96ad 6ee5cef6 3853cd88\n8bf20206 757d6d66 9c...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 has got a pr...
[{"type": "stdin_stdout", "input": "128\n1 2 4 6 8 17 20 20 23 33 43 49 49 49 52 73 74 75 82 84 85 87 90 91 102 103 104 105 111 111 401 142 142 152 155 160 175 176 178 181 183 184 187 188 191 193 326 202 202 214 224 225 236 239 240 243 246 247 249 249 257 257 261 264 265 271 277 281 284 284 286 289 290 296 297 303 305 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nNote that the memory limit in th...
[{"type": "stdin_stdout", "input": "3912472 307193683\n", "output": "149191773\n"}, {"type": "stdin_stdout", "input": "2525447 612881327\n", "output": "368194805\n"}, {"type": "stdin_stdout", "input": "2924225 629135317\n", "output": "498731287\n"}, {"type": "stdin_stdout", "input": "3175292 612881327\n", "output": "60...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nPetya loves lucky numbers. Every...
[{"type": "stdin_stdout", "input": "485 9554485\n7759121368632736852539182753173468028218114958118158732302477551670775608015153610483175626465946144780731573954182900412248382710280376491925985206156109890139333293746203940442347501294009600230166311978044218247083102712257326301109220002496805123344816427514286225153...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nDraw a chessboard which has a he...
[{"type": "stdin_stdout", "input": "11 21\n10 0\n5 0\n2 4\n2 0\n0 0", "output": "#.#.#.#.#.#.#.#.#.#.#\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\nSo the Beautiful Regional Contes...
[{"type": "stdin_stdout", "input": "5\n12\n5 4 4 3 2 2 1 1 1 1 1 1\n4\n4 3 2 0\n1\n1000000\n20\n20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 10 3 2 1\n32\n64 64 63 58 58 58 58 58 37 37 37 37 34 34 28 28 28 28 28 28 24 24 19 17 17 17 17 16 17 16 16 11\n", "output": "1 2 3\n0 0 0\n0 0 0\n1 2 7\n2 6 6\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\nA widely known among some people...
[{"type": "stdin_stdout", "input": "15\na b c d e f g h i j k l m n o\n1\n221 n g m h n f d a b a m d o n e e c c i a f f f i h m b o l j b d f m f i j c g d k l i b d a h l j e n b d b j o c c b c e c o g n h a b l m m h n a a a n e k m m a e b l i k a g h k k f d j c n g c d k b f k k a k g m b a j b n m f c f f o 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\nRead problems statements in Mand...
[{"type": "stdin_stdout", "input": "2\n-1 -1\n7 -1", "output": "2\n14\n"}, {"type": "stdin_stdout", "input": "2\n-1 -1\n2 11", "output": "2\n21\n"}, {"type": "stdin_stdout", "input": "2\n-1 -2\n4 14", "output": "3\n28\n"}, {"type": "stdin_stdout", "input": "2\n1 -1\n10 14", "output": "2\n28\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\nBob is travelling from one city ...
[{"type": "stdin_stdout", "input": "100\n84\nlrbbmqb\ncd\nr\nowkk\nhiddqsc\nxrjm\nwfr\nsjyb\ndbef\narcbynecd\nggx\npklore\nlnmpapqfwk\nopkm\noqhnwnkue\nhsqmgbbuq\nljjivswmd\nq\nbx\nxmvtr\nbljptnsn\nwzqf\nmafadrrwso\nsbcnuv\nhffbsaq\nwp\nc\ncehch\nvf\nkmlnozjkpq\nxrjxki\nzyxa\nbhhki\nq\noendtomfg\nwdwf\ngpxiq\nkuytdlcgd...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nInna and Dima decided to surpris...
[{"type": "stdin_stdout", "input": "63 67 18046757 61758841 85367218 68\n22 30\n25 40\n56 58\n29 11\n34 63\n28 66\n51 5\n39 64\n1 23\n24 61\n19 47\n10 31\n55 28\n52 26\n38 7\n28 31\n13 27\n37 42\n10 52\n19 33\n7 36\n13 1\n46 40\n21 41\n1 1\n6 35\n10 4\n46 9\n21 57\n1 49\n34 14\n14 35\n43 4\n1 41\n25 22\n18 25\n27 23\n4...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nShohag has an integer sequence $...
[{"type": "stdin_stdout", "input": "1\n39\n481199252 336470888 728039650 446497694 740396295 773386884 579721198 396628655 503722503 971207868 202647942 2087506 268792718 46761498 443917727 16843338 125908043 1772709198 717268783 787375312 150414369 693319712 519096230 29277141 856168102 762263554 674936674 407246545 2...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given a rectangle grid. ...
[{"type": "stdin_stdout", "input": "1000000000 1000001000 286536427 579261823 230782719 1150170645\n", "output": "209608854 195871608 363464000 962652038\n"}, {"type": "stdin_stdout", "input": "1000000000 1000000000 500000000 500000000 500000000 500000001\n", "output": "250000000 249999999 750000000 750000000\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 recreational mathematics, a [...
[{"input": "41796205765147426974704791528", "output": "[89]", "fn_name": "is_keith_number"}, {"input": "18354972585225358067718266", "output": "[78]", "fn_name": "is_keith_number"}, {"input": "855191324330802397989", "output": "[64]", "fn_name": "is_keith_number"}, {"input": "11812665388886672", "output": "[48]", "fn_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\nVasya's telephone contains n pho...
[{"type": "stdin_stdout", "input": "100 20 100 15061\nwwwwhhwhhwhhwhhhhhwwwhhhwwwhwwhwhhwwhhwwwhwwhwwwhwhwhwwhhhwwwhhwhwwhhwhwhwwwhwwwwhwhwwwwhwhhhwhwhwwh\n", "output": "100\n"}, {"type": "stdin_stdout", "input": "100 20 110 15061\nwwwwhhwhhwhhwhhhhhwwwhhhwwwhwwhwhhwwhhwwwhwwhwwwhwhwhwwhhhwwwhhwhwwhhwhwhwwwhwwwwhwhwwww...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nFind the volume of a cone whose ...
[{"input": "56\n30", "output": "[98520]", "fn_name": "volume"}, {"input": "7\n3", "output": "[153]", "fn_name": "volume"}, {"input": "0\n10", "output": "[0]", "fn_name": "volume"}, {"input": "10\n0", "output": "[0]", "fn_name": "volume"}, {"input": "0\n0", "output": "[0]", "fn_name": "volume"}]
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\nOne rainy gloomy evening when al...
[{"type": "stdin_stdout", "input": "010\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "011\n", "output": "4\n"}, {"type": "stdin_stdout", "input": "001\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "20\n", "output": "15\n"}, {"type": "stdin_stdout", "input": "15\n", "output": "4\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\nProblem Statement\n\nNathan O. D...
[{"type": "stdin_stdout", "input": "5\n1 x 0 4 x\n2\nx x\n2\n1 2\n2\n3 0\n2\n1000000000 x\n4\nx 4 1 x\n0", "output": "ambiguous\nnone\nambiguous\nnone\nambiguous\nambiguous\n"}, {"type": "stdin_stdout", "input": "5\n1 x 0 4 x\n2\nx x\n2\n1 2\n2\n3 0\n2\n0000000000 x\n4\nx 4 1 x\n0", "output": "ambiguous\nnone\nambiguou...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 write a program ...
[{"type": "stdin_stdout", "input": "6 2\n12 8\n0 0", "output": "Wednesday\nWednesday\n"}, {"type": "stdin_stdout", "input": "4 1\n2 18\n0 0", "output": "Thursday\nWednesday\n"}, {"type": "stdin_stdout", "input": "6 2\n7 17\n0 0", "output": "Wednesday\nSaturday\n"}, {"type": "stdin_stdout", "input": "1 1\n5 19\n0 0", "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\nPetya loves lucky numbers. Every...
[{"type": "stdin_stdout", "input": "614586850 1000000000\n", "output": "1110059271353421796\n"}, {"type": "stdin_stdout", "input": "190535551 1000000000\n", "output": "1340487604111893304\n"}, {"type": "stdin_stdout", "input": "614586850 1000001000\n", "output": "1110063715797865796\n"}, {"type": "stdin_stdout", "input...
code_stdio