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\nD: Shiritori Compression\n\nprob... | [{"type": "stdin_stdout", "input": "7\nbanana\nta\ntomb\nbus\nsound\ndoes\nsome", "output": "2\n"}, {"type": "stdin_stdout", "input": "7\nananab\nta\nsomb\nbus\nsound\ndoes\nsemo", "output": "3\n"}, {"type": "stdin_stdout", "input": "7\nbanaoa\nta\ntomb\nbus\nsound\ndoes\nsome", "output": "2\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\nEric is the teacher of graph the... | [{"type": "stdin_stdout", "input": "50\n21 10\n30 22\n3 37\n37 32\n4 27\n18 7\n2 30\n29 19\n6 37\n12 39\n47 25\n41 49\n45 9\n25 48\n16 14\n9 7\n33 28\n3 31\n34 16\n35 37\n27 40\n45 16\n29 44\n16 15\n26 15\n1 12\n2 13\n15 21\n43 14\n9 33\n44 15\n46 1\n38 5\n15 5\n1 32\n42 35\n20 27\n23 8\n1 16\n15 17\n36 50\n13 8\n49 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\nDexterina and Womandark have bee... | [{"type": "stdin_stdout", "input": "1000000 50\n0.034403 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.033928 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.071853 0.000000 0.000000 0.016440 0.000000 0.000000 0.000000 0.000000 0.023167 0.067938 0.000000 0.000000 0.000000 0.000000 0.... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nRead problems statements in Mand... | [{"type": "stdin_stdout", "input": "2\n-1 -1 0 100 100 0\n1 2 0 11 14 1", "output": "2 1\n"}, {"type": "stdin_stdout", "input": "2\n-1 1 -1 010 000 0\n1 6 0 10 14 1", "output": "1 2\n"}, {"type": "stdin_stdout", "input": "2\n-1 1 -1 000 000 0\n1 6 0 10 14 1", "output": "1 2\n"}, {"type": "stdin_stdout", "input": "2\n-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\nLet f(A, B) be the exclusive OR ... | [{"type": "stdin_stdout", "input": "1000000000000 1000000000000\n", "output": "1000000000000\n"}, {"type": "stdin_stdout", "input": "123456789012 123456789012\n", "output": "123456789012\n"}, {"type": "stdin_stdout", "input": "250874886258 260155437540\n", "output": "260155437541\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 have $n$ coins, each of the ... | [{"type": "stdin_stdout", "input": "1000000000\n", "output": "30\n"}, {"type": "stdin_stdout", "input": "1000000000\n", "output": "30"}, {"type": "stdin_stdout", "input": "723061816\n", "output": "30\n"}, {"type": "stdin_stdout", "input": "517188853\n", "output": "29\n"}, {"type": "stdin_stdout", "input": "237913214\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 smallest unit of data handle... | [{"type": "stdin_stdout", "input": "-322", "output": "-10304\n"}, {"type": "stdin_stdout", "input": "-542", "output": "-17344\n"}, {"type": "stdin_stdout", "input": "-130", "output": "-4160\n"}, {"type": "stdin_stdout", "input": "-133", "output": "-4256\n"}, {"type": "stdin_stdout", "input": "-199", "output": "-6368\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 Chef commutes to work every ... | [{"type": "stdin_stdout", "input": "3\n2\n0 3 6\n0 6 8\n2\n0 -1 3\n12 4 1\n2\n0 1 8\n0 0 12", "output": "14\n16\n12\n"}, {"type": "stdin_stdout", "input": "3\n2\n0 4 12\n-1 8 5\n2\n-1 1 2\n6 8 10\n2\n1 1 5\n0 2 3", "output": "12\n14\n5\n"}, {"type": "stdin_stdout", "input": "3\n2\n0 3 7\n0 6 5\n2\n0 -1 3\n12 4 1\n2\n1 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA tree is a connected undirected... | [{"type": "stdin_stdout", "input": "11005 209 166\n", "output": "1 2\n2 3\n3 4\n4 5\n5 6\n6 7\n7 8\n8 9\n9 10\n10 11\n11 12\n12 13\n13 14\n14 15\n15 16\n16 17\n17 18\n18 19\n19 20\n20 21\n21 22\n22 23\n23 24\n24 25\n25 26\n26 27\n27 28\n28 29\n29 30\n30 31\n31 32\n32 33\n33 34\n34 35\n35 36\n36 37\n37 38\n38 39\n39 40\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 Given an array `arr`, f... | [{"input": "[2, 1, 2, 1, 2]\n2", "output": "[3]", "fn_name": "rank_of_element"}, {"input": "[2, 1, 2, 2, 2]\n2", "output": "[2]", "fn_name": "rank_of_element"}, {"input": "[3, 2, 3, 4, 1]\n0", "output": "[2]", "fn_name": "rank_of_element"}, {"input": "[3, 2, 3, 4, 1]\n1", "output": "[1]", "fn_name": "rank_of_element"},... | 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\nSet\n\nGiven the sequence a_1, a... | [{"type": "stdin_stdout", "input": "6\n-4 -3 1 -1 27 -1", "output": "5\n"}, {"type": "stdin_stdout", "input": "6\n-1 0 63 -1 3 -1", "output": "4\n"}, {"type": "stdin_stdout", "input": "6\n-2 -1 25 -2 4 0", "output": "5\n"}, {"type": "stdin_stdout", "input": "6\n-1 -1 25 -2 4 0", "output": "5\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 an integer sequenc... | [{"type": "stdin_stdout", "input": "15 2\n1 2 3 1 2 3 1 2 3 1 2 3 1 2 3\n", "output": "97\n"}, {"type": "stdin_stdout", "input": "15 1\n1 2 3 1 2 3 1 2 3 1 2 3 1 2 3\n", "output": "18\n"}, {"type": "stdin_stdout", "input": "15 1\n1 2 3 0 2 3 1 2 3 1 2 3 1 2 3\n", "output": "15\n"}, {"type": "stdin_stdout", "input": "15... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 68719476736\n202243898 470292528 170057449 290025540 127995253 514454151 607963029 768676450 611202521 68834463\n", "output": "2773043292\n"}, {"type": "stdin_stdout", "i... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSunuke-kun's dictionary contains... | [{"type": "stdin_stdout", "input": "2\n?rum??mer\nc??a??mp", "output": "715167440\n"}, {"type": "stdin_stdout", "input": "2\n?sum??mer\nc??a??mp", "output": "703286064"}, {"type": "stdin_stdout", "input": "2\n?rum??mer\nc@?a??mp", "output": "0\n"}, {"type": "stdin_stdout", "input": "2\n?rum??mer\ncA?a??mp", "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\nAs a German University in Cairo ... | [{"type": "stdin_stdout", "input": "65 173 136\n26 18 8 11 1 22 44 6 15 22 13 49 30 36 37 41 25 27 9 36 36 1 45 20 7 47 28 30 30 21 33 32 9 11 16 5 19 12 44 40 25 40 32 36 15 34 4 43 28 19 29 33 7 11 18 13 40 18 10 26 1 48 20 38 1 20 34 8 46 8 32 35 16 49 26 36 11 16 4 29 35 44 14 21 22 42 10 1 3 12 35 30 14 45 2 24 32... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 sum of weights of edges... | [{"type": "stdin_stdout", "input": "6 1\n0 1 -1\n1 0 2\n1 2 8\n-1 3 13\n0 0 -1\n1 -1 11\n7 0 0\n2 1 2\n1 8 0", "output": "-1\n"}, {"type": "stdin_stdout", "input": "6 9\n0 2 1\n0 2 3\n0 2 2\n0 3 7\n2 4 5\n1 4 3\n3 2 1\n3 3 1\n2 5 10", "output": "20\n"}, {"type": "stdin_stdout", "input": "6 9\n0 2 1\n0 2 3\n2 0 2\n1 3 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\nAndryusha is an orderly boy and ... | [{"type": "stdin_stdout", "input": "50\n50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 10 4 3 2... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSasha lives in a big happy famil... | [{"type": "stdin_stdout", "input": "4 3\n1 2\n2 3\n3 4\n1 2 3 4\n", "output": "4\n4\n3\n2\n1\n"}, {"type": "stdin_stdout", "input": "4 3\n1 2\n2 3\n3 4\n1 2 3 3\n", "output": "3\n3\n2\n1\n"}, {"type": "stdin_stdout", "input": "4 3\n1 2\n2 3\n3 4\n1 1 3 4\n", "output": "3\n4\n3\n1\n"}, {"type": "stdin_stdout", "input": ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nMishka got an integer array $a$ ... | [{"type": "stdin_stdout", "input": "10\n10100 18 108515962 1 16 111 2 999999999 60506056 1000000000\n", "output": "10099 17 108515961 1 15 111 1 999999999 60506055 999999999\n"}, {"type": "stdin_stdout", "input": "10\n10100 12 108515962 1 5 101 2 999999999 60506056 1000000000\n", "output": "10099 11 108515961 1 5 101 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\nVasya works as a DJ in the best ... | [{"type": "stdin_stdout", "input": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA@AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\n", "output": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 get more and more news about ... | [{"type": "stdin_stdout", "input": "100\n70 111 5 73 69 22 79 62 101 99 249 88 75 31 27 49 7 36 37 62 61 77 75 38 203 61 81 43 98 224 114 48 98 8 67 46 80 83 81 64 15 72 95 39 79 93 79 140 27 65 67 44 294 170 89 97 73 48 18 53 31 49 47 13 88 70 5 46 256 81 26 9 89 38 43 28 219 30 10 71 96 95 241 96 98 96 82 29 219 85 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\nAlmost Identical Programs\n\nThe... | [{"type": "stdin_stdout", "input": "print\"hello\";print133\nprint\"hello\";print123\nread\"B1input\";solve;output;\n;tuptuo;evlos;\"2B\"daer\nread\"C1\";solve;output\"C1ans\";\nread\"C2\";solve;output\"C2ans\";\n\"\"\"\"\"\"\"\"\n\"\"\"42\"\"#\"\"\nslow\"program\"\nfast\"code\"\n\"super\"fast\"program\"\n\"super\"fast... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nPeter is a senior manager of Agi... | [{"type": "stdin_stdout", "input": "2\ndevelopment:alice,bob,design,eve.\ndesign:carol,alice.\n3\none:another.\nanother:yetanother.\nxetanother:dave.\n3\nfriends:alice,bob,bestfriends,carol,fran,badcompany.\nbestfriends:eve,alice.\nbadcompany:dave,carol.\n5\na:b,c,d,e.\nb:c,d,e,f.\nc:d,e,f,g.\nd:e,f,g,h.\ne:f,g,h,i.\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\n---\n\n# Hint\n\n\nThis Kata is ... | [{"input": "\"^~?!'\\\"()-:;+&%*=<>\\u20ac\\u00a3$\\u00a5\\u00a4\\\\[]{},.@\\u00a7#\\u00bf\\u00a1_/ \"", "output": "[88]", "fn_name": "tv_remote"}, {"input": "\"The Quick Brown Fox Jumps Over A Lazy Dog.\"", "output": "[262]", "fn_name": "tv_remote"}, {"input": "\"abcde123fghij456klmno789pqrst.@0uvwxyz_/ \"", "output":... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given two strings. In a ... | [{"input": "\"nogkvcdldfpvlbkpedsecl\"\n\"nogkvcdldfpvlbkpedsecl\"", "output": "[0]", "fn_name": "shift_left"}, {"input": "\"abacabadabacaba\"\n\"abacabadacaba\"", "output": "[18]", "fn_name": "shift_left"}, {"input": "\"test\"\n\"west\"", "output": "[2]", "fn_name": "shift_left"}, {"input": "\"dadc\"\n\"dddc\"", "outp... | 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\nTetris is a game in which fallin... | [{"type": "stdin_stdout", "input": "4\n2 4 1\n1 3 1\n2 2 4\n2 3 5\n1\n1 5 1\n7\n2 2 2\n1 1 1\n2 1 3\n1 4 1\n1 1 1\n2 5 5\n1 4 2\n0", "output": "12\n0\n13\n"}, {"type": "stdin_stdout", "input": "4\n2 4 1\n1 3 1\n2 2 4\n2 3 5\n1\n1 5 1\n7\n2 2 2\n1 1 1\n2 0 3\n1 4 1\n1 1 1\n2 5 5\n1 4 2\n0", "output": "12\n0\n12\n"}, {"t... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nOne day a well-known sponsor of ... | [{"type": "stdin_stdout", "input": "302 143 40 63 452\n100\nXXL\nM\nXL\nS\nXXL\nS\nL\nXL\nXL\nXL\nXXL\nS\nXXL\nS\nXXL\nXL\nXL\nXXL\nXL\nXXL\nM\nS\nS\nS\nS\nXXL\nS\nL\nXL\nXXL\nXXL\nS\nXXL\nL\nXXL\nM\nS\nL\nL\nXL\nXL\nS\nXL\nL\nXL\nM\nXL\nL\nM\nS\nXL\nXXL\nXL\nL\nXL\nXL\nXL\nM\nM\nXL\nL\nS\nS\nXL\nS\nXXL\nXXL\nXL\nS\nXL... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nMake a wish to a shooting star\n... | [{"type": "stdin_stdout", "input": "1\n0.0000 0.0000 0.0000 2.0000 0.0000 0.0000 4.0000 1.0000\n2\n0.0000 0.0000 0.0000 2.0000 0.0000 0.0000 4.0000 1.0000\n10.0000 0.0000 0.0000 -2.0000 0.0000 0.0000 4.0000 1.0000\n5\n-10.0000 0.5301491670709055 0.0000 10.0000 0.15723569039702578 0.6247894746810593 2.0000 1.0000\n-5.00... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nBizon the Champion isn't just a ... | [{"type": "stdin_stdout", "input": "itwtyhhsdjjffmmoqkkhxjouypznewstyorotxhozlytndehmaxogrohccnqcgkrjrdmnuaogiwmnmsbdaizqkxnkqxxiihbwepc\nsnixfywvcntitcefsgqxjcodwtumurcglfmnamnowzbjzmfzspbfuldraiepeeiyasmrsneekydsbvazoqszyjxkjiotushsddet\n", "output": "need tree\n"}, {"type": "stdin_stdout", "input": "yyyyxxxxyxyyxxxy... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nKyoya Ootori has a bag with n co... | [{"type": "stdin_stdout", "input": "47\n20\n21\n16\n18\n24\n20\n25\n13\n20\n22\n26\n24\n17\n18\n21\n22\n21\n23\n17\n15\n24\n19\n18\n21\n20\n19\n26\n25\n20\n17\n17\n17\n26\n32\n20\n21\n25\n28\n24\n21\n21\n17\n28\n20\n20\n31\n19\n", "output": "295545118\n"}, {"type": "stdin_stdout", "input": "47\n20\n21\n16\n18\n24\n20\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\nTaro's Shopping\n\nMammy decided... | [{"type": "stdin_stdout", "input": "3 13\n17 20 30\n6 7\n1 2 5 1 4 11\n7 000\n22 34 102 94 59 39 61\n4 100\n133 98 100 50\n4 5\n10 5 10 13\n0 0", "output": "NONE\n7\nNONE\nNONE\nNONE\n"}, {"type": "stdin_stdout", "input": "3 48\n17 20 30\n6 1\n1 2 5 1 4 11\n7 000\n22 34 102 94 59 39 70\n4 100\n80 70 119 50\n4 20\n10 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\nOne day Vasya went out for a wal... | [{"type": "stdin_stdout", "input": "1000 2000\n226 566\n20\n0 -100\n-100 100\n100 0\n42 0\n-100 -79\n-66 -16\n0 -7\n-1 0\n0 100\n100 91\n99 0\n1 0\n-100 0\n70 -100\n-100 100\n100 1\n66 0\n-100 1\n-47 -100\n-42 0\n", "output": "708\n"}, {"type": "stdin_stdout", "input": "1010 2000\n226 566\n20\n0 -100\n-100 100\n100 0\n... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nVasya has got an array consistin... | [{"type": "stdin_stdout", "input": "10 42 7\n-1 -1 -1 -1 -1 -1 -1 -1 -1 -1\n", "output": "645711643\n"}, {"type": "stdin_stdout", "input": "10 42 7\n-1 -1 -1 -1 -1 -1 -1 -1 -1 -1\n", "output": "645711643\n"}, {"type": "stdin_stdout", "input": "10 32 7\n-1 -1 -1 -1 -1 -1 -1 -1 -1 -1\n", "output": "61884984"}, {"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\n# Bubblesort Algorithm\n\n## Ove... | [{"input": "[6, 3, 4, 15, 14, 9, 1, 2, 7, 8, 5, 14, 11, 15, 17, 19]", "output": "[[3, 4, 6, 14, 9, 1, 2, 7, 8, 5, 14, 11, 15, 15, 17, 19]]", "fn_name": "bubblesort_once"}, {"input": "[9, 7, 5, 3, 1, 2, 4, 6, 8]", "output": "[[7, 5, 3, 1, 2, 4, 6, 8, 9]]", "fn_name": "bubblesort_once"}, {"input": "[6, 3, 4, 9, 1, 2, 7, ... | 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 ICPC committee would like to... | [{"type": "stdin_stdout", "input": "3 2\n2 1 2\n-1\n3 3 8 8\n3 2\n4 1 5 0 9\n3 2 5 9\n5 2 4 5 7 12\n3 3\n0 1 4\n3 2 5 9\n2 2 4\n3 3\n2 1 1\n3 1 2 9\n2 2 4\n0 0", "output": "8\n5\n0\n1\n"}, {"type": "stdin_stdout", "input": "3 2\n2 1 2\n-1\n3 3 8 8\n3 2\n4 1 5 0 9\n3 2 5 9\n5 2 4 5 7 12\n3 3\n0 1 4\n3 2 5 9\n2 2 4\n3 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\nLet’s play a stone removing game... | [{"type": "stdin_stdout", "input": "12 2 3\n100 15522 98\n10000 10000 10000\n0 0 0", "output": "10\n89\n2019\n"}, {"type": "stdin_stdout", "input": "12 2 3\n100 15914 98\n10000 10000 10000\n0 0 0", "output": "10\n16\n2019\n"}, {"type": "stdin_stdout", "input": "12 2 3\n100 15914 98\n10001 10000 10000\n0 0 0", "output":... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe country of Byalechinsk is ru... | [{"type": "stdin_stdout", "input": "100 1\n439 158 619 538 187 153 973 781 610 475 94 1829 449 531 220 51 788 118 189 501 54 434 465 902 280 635 688 214 737 327 682 690 683 519 261 923 254 388 529 659 662 276 376 735 976 664 521 285 42 147 187 259 407 977 879 465 522 17 550 701 114 921 577 265 668 812 232 267 135 371 4... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLet's denote d(n) as the number ... | [{"type": "stdin_stdout", "input": "100 100 100\n", "output": "51103588\n"}, {"type": "stdin_stdout", "input": "100 100 100\n", "output": "51103588"}, {"type": "stdin_stdout", "input": "98 34 100\n", "output": "13589991\n"}, {"type": "stdin_stdout", "input": "90 82 100\n", "output": "35482866\n"}, {"type": "stdin_stdou... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere are $n$ products in the sh... | [{"type": "stdin_stdout", "input": "5\n8 19551489\n31131899 17585660 3913937 14521321 9846714 96097161 115568124 35051437\n1 93900441\n15578410\n7 19560555\n124492495 53703939 20259503 99698023 98868060 83313210 5487534\n6 72321938\n59271765 72426489 16625497 51598082 31475864 20946400\n7 44965081\n49955408 62397026 39... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAndrew was very excited to parti... | [{"type": "stdin_stdout", "input": "100000000\n30\n30\n", "output": "10\n"}, {"type": "stdin_stdout", "input": "100000000\n30\n30\n", "output": "10\n"}, {"type": "stdin_stdout", "input": "100000000\n60\n30\n", "output": "10\n"}, {"type": "stdin_stdout", "input": "100000000\n31\n33\n", "output": "0\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\nGiven the sum and gcd of two num... | [{"input": "1000\n5", "output": "[[5, 995]]", "fn_name": "solve"}, {"input": "50\n10", "output": "[[10, 40]]", "fn_name": "solve"}, {"input": "100\n5", "output": "[[5, 95]]", "fn_name": "solve"}, {"input": "12\n4", "output": "[[4, 8]]", "fn_name": "solve"}, {"input": "10\n5", "output": "[[5, 5]]", "fn_name": "solve"}, ... | 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\nRead problems statements in Mand... | [{"type": "stdin_stdout", "input": "1\n16 -10", "output": "-326\n"}, {"type": "stdin_stdout", "input": "1\n32 -10", "output": "-662\n"}, {"type": "stdin_stdout", "input": "1\n23 -10", "output": "-473\n"}, {"type": "stdin_stdout", "input": "1\n23 -20", "output": "-923\n"}, {"type": "stdin_stdout", "input": "1\n17 -20", ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given an array $a$ consi... | [{"type": "stdin_stdout", "input": "3\n5\n1 2 3 4 5\n5\n4 4 4 4 2\n6\n1 3 1 5 3 1\n", "output": "-1 -1 3 2 1 \n-1 4 4 4 2 \n-1 -1 1 1 1 1 \n"}, {"type": "stdin_stdout", "input": "3\n5\n1 2 3 1 2\n5\n4 4 4 3 2\n6\n1 4 3 5 1 1\n", "output": "-1 -1 1 1 1\n-1 -1 4 3 2\n-1 -1 -1 1 1 1\n"}, {"type": "stdin_stdout", "input": ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou have recently fallen through... | [{"type": "stdin_stdout", "input": "11\nfghdgrakmnq\n8\nfgh 4\ngh 3\nh 10\nhdg 6\nhdgra 7\nakm 12\nrakm 5\na 15\n3\n", "output": "52\n"}, {"type": "stdin_stdout", "input": "11\nfghdgrakmnq\n8\nfgh 4\ngh 3\nh 10\nhdg 6\nargdh 7\nakm 12\nrakm 5\na 15\n3\n", "output": "52\n"}, {"type": "stdin_stdout", "input": "11\nfghdgr... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLong is a huge fan of CFC (Codef... | [{"type": "stdin_stdout", "input": "4\n3 5 3\n..R..\n...R.\n....R\n6 4 12\nR..R\nR..R\nRRRR\nRRRR\nR..R\nR..R\n5 5 4\nRRR..\nR.R..\nRRR..\nR..R.\nR.R..\n2 31 62\nRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR\nRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR\n", "output": "aaabb\ncccbb\nccccc\naaaa\nbbbb\nccdd\nhgfe\nijjj\nlllk\naaabb\nbbbbb\nbcccc\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\nYour job is to create a calculat... | [{"input": "\"5 1 2 + 4 * + 3 -\"", "output": "[14]", "fn_name": "calc"}, {"input": "\"10000 123 +\"", "output": "[10123]", "fn_name": "calc"}, {"input": "\"1 3 -\"", "output": "[-2]", "fn_name": "calc"}, {"input": "\"3.5\"", "output": "[3.5]", "fn_name": "calc"}, {"input": "\"1 3 +\"", "output": "[4]", "fn_name": "cal... | 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 $n$ integer number... | [{"type": "stdin_stdout", "input": "150\n0 0 0 0 0 0 0 2537672836907008 0 0 0 0 0 0 16384 0 0 0 0 34360787232 0 0 70871155232 0 0 0 0 0 0 0 0 0 0 0 2256197860262016 0 0 0 0 0 0 0 0 0 0 536872961 0 0 0 0 0 0 0 0 0 0 33619968 0 0 0 0 0 0 0 0 0 0 0 0 37189881297899520 0 18031990695526400 0 0 1099511627776 0 0 0 0 0 0 0 0 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\n### Description\nAs hex values c... | [{"input": "\"DO YOU SEE THAT BEE DRINKING DECAF COFFEE\"", "output": "[13565769]", "fn_name": "hex_word_sum"}, {"input": "\"ASSESS ANY BAD CODE AND TRY AGAIN\"", "output": "[10889952]", "fn_name": "hex_word_sum"}, {"input": "\"DEFACE\"", "output": "[14613198]", "fn_name": "hex_word_sum"}, {"input": "\"SAFE\"", "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\nVasya plays the sleuth with his ... | [{"type": "stdin_stdout", "input": "ARIWmwqFqxsQXsXXzHqvFjxOCttAGPUzDtWzsenPYdNXuFOIUGYZsLLK IaoxiyjBBRThoelwdPTkuCQfcBLUEJpCPIrVZlvUWA?\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "ARIWmwqFqxsQXsXXzHqvFjxOCttAGPUzDtWzsenPYdNXuFOIUGYZsLLK IaoxiykBBRThoelwdPTkuCQfcBLUEJpCPIrVZlvUWA?\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\nPolycarp has $26$ tasks. Each ta... | [{"type": "stdin_stdout", "input": "5\n3\nABA\n11\nDDBBCCCBBEZ\n7\nFFGZZZY\n1\nZ\n2\nAB\n", "output": "\nNO\nNO\nYES\nYES\nYES\n"}, {"type": "stdin_stdout", "input": "5\n3\nABA\n11\nDDBBCCCBBEZ\n7\nFFGZZZY\n1\nZ\n2\nAB\n", "output": "NO\nNO\nYES\nYES\nYES\n"}, {"type": "stdin_stdout", "input": "1\n24\nDEBOOFORCEDMETODO... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 been recruited by an un... | [{"input": "\"welcome to the organization\"", "output": "[\"qibkyai ty tfi yvgmzenmteyz\"]", "fn_name": "encrypter"}, {"input": "\"my name is\"", "output": "[\"ao zmai eu\"]", "fn_name": "encrypter"}, {"input": "\"goodbye\"", "output": "[\"gyyjloi\"]", "fn_name": "encrypter"}, {"input": "\"hello\"", "output": "[\"fibby... | 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 n number of people in a ro... | [{"input": "15", "output": "[0.25]", "fn_name": "calculate_probability"}, {"input": "5", "output": "[0.03]", "fn_name": "calculate_probability"}, {"input": "365", "output": "[1]", "fn_name": "calculate_probability"}, {"input": "366", "output": "[1]", "fn_name": "calculate_probability"}, {"input": "1", "output": "[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\nFans of The Wire will appreciate... | [{"input": "\"4103432323\"", "output": "[\"6957678787\"]", "fn_name": "decode"}, {"input": "\"4103438970\"", "output": "[\"6957672135\"]", "fn_name": "decode"}, {"input": "\"4104305768\"", "output": "[\"6956750342\"]", "fn_name": "decode"}, {"input": "\"4102204351\"", "output": "[\"6958856709\"]", "fn_name": "decode"},... | 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 educational program (AHK Edu... | [{"type": "stdin_stdout", "input": "-1 -2 1 11", "output": "no\n"}, {"type": "stdin_stdout", "input": "-1 -2 1 19", "output": "no\n"}, {"type": "stdin_stdout", "input": "-2 -2 1 1", "output": "yes\n"}, {"type": "stdin_stdout", "input": "-1 4 4 10", "output": "no\n"}, {"type": "stdin_stdout", "input": "-1 1 4 10", "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\nYou are given an initial 2-value... | [{"input": "[9, 3]", "output": "[[[9, 3], [9, 3], [9, 3], [9, 3], [9, 3], [9, 3], [9, 3], [9, 3], [9, 3], [9, 3], [9, 3], [9, 3]]]", "fn_name": "explode"}, {"input": "[6, \"c\"]", "output": "[[[6, \"c\"], [6, \"c\"], [6, \"c\"], [6, \"c\"], [6, \"c\"], [6, \"c\"]]]", "fn_name": "explode"}, {"input": "[\"a\", 3]", "outp... | 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 play your favourite game yet... | [{"type": "stdin_stdout", "input": "5\n1 1 100000000\n100000000 100000000 100000000\n100000000 1 100000000\n1 100000000 100000000\n100000000 100000000 1\n", "output": "50000000\n50000000\n100000000\n1\n1\n"}, {"type": "stdin_stdout", "input": "5\n1 1 100000000\n100000000 100000000 100000000\n100000000 1 100000000\n1 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\nEach evening after the dinner th... | [{"type": "stdin_stdout", "input": "1000000000 846040702\n", "output": "999939239\n"}, {"type": "stdin_stdout", "input": "1000000000 315152540\n", "output": "999948715\n"}, {"type": "stdin_stdout", "input": "1000000000 315152540\n", "output": "999948715"}, {"type": "stdin_stdout", "input": "1000000000 846040702\n", "ou... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nCan the greatest common divisor ... | [{"type": "stdin_stdout", "input": "9\n30\n11\n12\n122\n136\n92\n1984716\n217\n14628115\n", "output": "31\n15\n15\n127\n255\n127\n2097151\n255\n16777215\n"}, {"type": "stdin_stdout", "input": "9\n30\n7\n12\n122\n136\n92\n1984716\n204\n14628115\n", "output": "31\n1\n15\n127\n255\n127\n2097151\n255\n16777215\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\nWe have N points in a two-dimens... | [{"type": "stdin_stdout", "input": "4 3\n-1000000000 -1000000000\n1000000000 1000000000\n-999999999 999999999\n999999999 -999999999\n", "output": "3999999996000000001\n"}, {"type": "stdin_stdout", "input": "4 3\n-1000000000 -1000000000\n1000000000 1000000000\n-999999999 999999999\n999999999 -1704052742", "output": "400... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLeonid wants to become a glass c... | [{"type": "stdin_stdout", "input": "5 30 10\nH 8\nH 9\nV 1\nH 2\nH 5\nH 3\nH 1\nV 2\nH 13\nV 3\n", "output": "110\n105\n84\n84\n84\n84\n84\n63\n51\n34\n"}, {"type": "stdin_stdout", "input": "5 15 10\nH 8\nH 9\nV 1\nH 2\nH 6\nH 4\nH 1\nV 2\nH 13\nV 3\n", "output": "40\n40\n32\n24\n24\n24\n24\n18\n12\n8\n"}, {"type": "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\nJohn Doe has an n × m table. Joh... | [{"type": "stdin_stdout", "input": "100 1000000000000000000 5000\n", "output": "824224847\n"}, {"type": "stdin_stdout", "input": "100 1000000000000000000 1221\n", "output": "43180268\n"}, {"type": "stdin_stdout", "input": "79 1000000000000000000 3107\n", "output": "631080535\n"}, {"type": "stdin_stdout", "input": "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\nAsmany strings are strings of '0... | [{"type": "stdin_stdout", "input": "2\n12\n12", "output": "YES\nYES\n"}, {"type": "stdin_stdout", "input": "2\n12\n4", "output": "YES\nYES\n"}, {"type": "stdin_stdout", "input": "2\n18\n12", "output": "NO\nYES\n"}, {"type": "stdin_stdout", "input": "2\n12\n6", "output": "YES\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\n[Image] \n\n\n-----Input-----\n\... | [{"type": "stdin_stdout", "input": "0\n1\n1\n0\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "0\n0\n0\n0\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "1\n0\n0\n0\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "0\n1\n0\n0\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "1\n1\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\nproblem\n\nGiven a sequence of n... | [{"type": "stdin_stdout", "input": "5 1\n-1\n18\n-4\n17\n2\n0 0", "output": "18\n"}, {"type": "stdin_stdout", "input": "5 1\n-1\n3\n-4\n30\n2\n0 0", "output": "30\n"}, {"type": "stdin_stdout", "input": "5 3\n2\n13\n-3\n27\n1\n0 0", "output": "37\n"}, {"type": "stdin_stdout", "input": "5 1\n2\n10\n-4\n14\n2\n0 0", "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\nThere is a polyline going throug... | [{"type": "stdin_stdout", "input": "1000000000 1000000000\n", "output": " 1000000000\n"}, {"type": "stdin_stdout", "input": "1000000000 999999999\n", "output": "999999999.5000000000\n"}, {"type": "stdin_stdout", "input": "1000000000 111111111\n", "output": "111111111... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 computer games. Fina... | [{"type": "stdin_stdout", "input": "100 10000\n100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 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\nWrite a program which calculates... | [{"type": "stdin_stdout", "input": "-210", "output": "138544.236023275 -1319.46891451\n"}, {"type": "stdin_stdout", "input": "-215", "output": "145220.120412152 -1350.88484104\n"}, {"type": "stdin_stdout", "input": "-113", "output": "40114.996593678 -709.999939711\n"}, {"type": "stdin_stdout", "input": "-114", "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\nEnter a positive integer n of 4,... | [{"type": "stdin_stdout", "input": "2\n-1\n207", "output": "10\n0\n1521520\n"}, {"type": "stdin_stdout", "input": "2\n-1\n254", "output": "10\n0\n2796160\n"}, {"type": "stdin_stdout", "input": "2\n-1\n326", "output": "10\n0\n5881204\n"}, {"type": "stdin_stdout", "input": "2\n-1\n100", "output": "10\n0\n176851\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 the army, it isn't easy to fo... | [{"type": "stdin_stdout", "input": "50 2\nYES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES\n", "output": "Aa Ab Ac Ad Ae Af Ag Ah Ai Aj Ak Al Am An Ao Ap Aq Ar As At Au Av 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\nHaving learned (not without some... | [{"type": "stdin_stdout", "input": "15 31 1\n--------R---------G------------\n-G----------------------------R\n--------------G--------------R-\n---G--------------------------R\n-----R---------G---------------\n--R--G-------------------------\n-----G-----------------R-------\n--R-------------------G--------\n-R---------... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 prime numbers are not regula... | [{"input": "2\n10000000\n11000000", "output": "[[10000139, 10000141]]", "fn_name": "step"}, {"input": "2\n104000\n105000", "output": "[[104087, 104089]]", "fn_name": "step"}, {"input": "4\n30000\n100000", "output": "[[30109, 30113]]", "fn_name": "step"}, {"input": "6\n30000\n100000", "output": "[[30091, 30097]]", "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\nLet $f_{x} = c^{2x-6} \\cdot f_{... | [{"type": "stdin_stdout", "input": "1000000000000000000 1000000000 1000000000 1000000000 1000000000\n", "output": "607659049\n"}, {"type": "stdin_stdout", "input": "1000000000000000000 1000000000 1000000000 1000000000 1000000000\n", "output": "607659049"}, {"type": "stdin_stdout", "input": "1440135023384277212 29874180... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nPolycarp found $n$ segments on t... | [{"type": "stdin_stdout", "input": "4\n3\n1 4\n2 3\n3 6\n4\n1 2\n2 3\n3 5\n2 5\n5\n0 0\n1 13\n4 1\n6 14\n9 10\n5\n1 5\n2 4\n3 5\n2 8\n4 8\n", "output": "0\n0\n1\n0\n"}, {"type": "stdin_stdout", "input": "4\n3\n1 4\n2 3\n3 6\n4\n1 2\n2 3\n3 5\n2 5\n5\n0 0\n1 13\n4 1\n6 14\n9 10\n5\n1 5\n2 4\n3 5\n2 9\n4 8\n", "output": ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe Smart Beaver from ABBYY was ... | [{"type": "stdin_stdout", "input": "10 50 200\n10 1 22\n2 9 6\n4 2 98\n6 6 38\n5 1 67\n6 7 17\n10 4 29\n6 5 97\n3 8 51\n1 6 31\n5 9 72\n4 5 50\n2 1 3\n10 2 27\n1 10 78\n9 9 48\n8 7 81\n5 8 64\n9 4 78\n7 5 90\n9 8 83\n7 1 99\n5 5 43\n1 2 37\n3 3 6\n4 3 61\n9 6 25\n1 3 46\n2 10 18\n1 4 68\n2 4 75\n3 10 67\n7 8 82\n5 7 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've arrived at a carnival and... | [{"input": "8\n0.92\n\"|~~~~2~2~~~~~22~~2~~~~2~~~2|\"", "output": "[\"|~~~~X~X~~~~~XX~~X~~~~X~~~X|\"]", "fn_name": "duck_shoot"}, {"input": "4\n0.64\n\"|~~2~~~22~2~~22~2~~~~2~~~|\"", "output": "[\"|~~X~~~X2~2~~22~2~~~~2~~~|\"]", "fn_name": "duck_shoot"}, {"input": "6\n0.41\n\"|~~~~~22~2~~~~~|\"", "output": "[\"|~~~~~XX... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe only difference between easy... | [{"type": "stdin_stdout", "input": "200 103 37\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nChouti is working on a strange m... | [{"type": "stdin_stdout", "input": "80\n24 192 896 1568 2907 4840 7475 9775 11109 29939 22475 45951 46552 36859 66787 106329 85211 94423 65627 147436 143259 128699 139277 167743 178063 192167 150133 162719 177103 160732 139859 157301 176681 199291 152867 182611 199632 199535 199905 199959\n", "output": "Yes\n1 24 39 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\nThe 9-th grade student Gabriel n... | [{"type": "stdin_stdout", "input": "43951 66098\n1604 35654\n", "output": "-1\n"}, {"type": "stdin_stdout", "input": "35413 75637\n4087 30166\n", "output": "-1\n"}, {"type": "stdin_stdout", "input": "28473 80380\n2568 95212\n", "output": "-1\n"}, {"type": "stdin_stdout", "input": "43951 66098\n1604 35654\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\nThis problem uses a simplified n... | [{"type": "stdin_stdout", "input": "10 14\n3 2\n7 2\n6 4\n8 1\n3 9\n5 6\n6 3\n4 1\n2 5\n7 10\n9 5\n7 1\n8 10\n3 4\n", "output": "unknown topology\n"}, {"type": "stdin_stdout", "input": "10 14\n3 2\n7 2\n6 4\n8 1\n3 9\n5 6\n6 3\n4 1\n2 5\n7 10\n9 5\n7 1\n8 10\n3 4\n", "output": "unknown topology\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\nColour plays an important role i... | [{"input": "[[\"red\", \"energy\"], [\"yellow\", \"creativity\"], [\"brown\", \"friendly\"], [\"green\", \"growth\"]]", "output": "[[{\"red\": \"energy\"}, {\"yellow\": \"creativity\"}, {\"brown\": \"friendly\"}, {\"green\": \"growth\"}]]", "fn_name": "colour_association"}, {"input": "[[\"white\", \"goodness\"], [\"blu... | 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\nSome natural number was written ... | [{"type": "stdin_stdout", "input": "900\n13595314340746721027884681972026445045155446054797436718350397773609081581610067818125738383867204953\n", "output": "86\n"}, {"type": "stdin_stdout", "input": "200\n1000000010000000000000000000010000000000000001000001000000000000000000000000000000000000000000000000\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 playing a new computer g... | [{"type": "stdin_stdout", "input": "13\n3 2 4\n10 2 4\n10 3 5\n5 4 6\n7 1 1\n3 3 3\n6 6 6\n14 2 2\n16 1 1\n9 9 9\n26 3 3\n9 8 10\n4 1 4\n", "output": "YES\nNO\nYES\nNO\nYES\nYES\nYES\nYES\nNO\nYES\nNO\nYES\nYES\n"}, {"type": "stdin_stdout", "input": "13\n3 2 4\n10 2 4\n10 3 5\n5 4 6\n7 1 1\n3 3 3\n6 6 6\n14 2 2\n16 1 1... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA festival will be held in a tow... | [{"type": "stdin_stdout", "input": "100 20 5\n47 93 3\n61 49 10\n14 69 10\n88 2 14\n35 86 18\n63 16 20\n39 49 22\n32 45 23\n66 54 25\n77 2 36\n96 85 38\n33 28 45\n29 78 53\n78 13 60\n58 96 64\n74 39 71\n18 80 80\n18 7 85\n97 82 96\n74 99 97\n", "output": " 877... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 implemented a prog... | [{"type": "stdin_stdout", "input": "3\n7\n1\n16", "output": "3.44444445\n0.45\n7.94444444444\n"}, {"type": "stdin_stdout", "input": "3\n4\n1\n16", "output": "1.94445\n0.45\n7.94444444444\n"}, {"type": "stdin_stdout", "input": "3\n4\n0\n16", "output": "1.94445\n0.0\n7.94444444444\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\nOur football team finished the c... | [{"input": "[\"1:0\", \"2:0\", \"3:0\", \"4:0\", \"2:1\", \"3:1\", \"4:1\", \"3:2\", \"4:2\", \"4:3\"]", "output": "[30]", "fn_name": "points"}, {"input": "[\"1:1\", \"2:2\", \"3:3\", \"4:4\", \"2:2\", \"3:3\", \"4:4\", \"3:3\", \"4:4\", \"4:4\"]", "output": "[10]", "fn_name": "points"}, {"input": "[\"1:0\", \"2: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\nIn the year 2020, a race of atom... | [{"type": "stdin_stdout", "input": "2\n2 3\n1.1946563976133233\n1 2.557093764182385 0.48719322387595776 0.3\n5\n5 6 15 20 25\n0.15\n1 1.0 0.04 1.0346326402545585\n10\n1783 3640 3991 4623 5465 5481 6369 6533 6865 8425\n5.110816362691462\n72 59.4705 0.6319554453888588 0.12728810127294996\n0", "output": "1.317231571615\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 two integers $x$ a... | [{"type": "stdin_stdout", "input": "69\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n4 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 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\nIn 2300, the Life Science Divisi... | [{"type": "stdin_stdout", "input": "ABC 3\nABC 2\n2(4()B)3(XY)A10C 30\n1000(1000(1000(1000(1000(1000(OM)))))) 1090860\n0 0", "output": "0\nC\n0\nO\n"}, {"type": "stdin_stdout", "input": "CBA 3\nABC 0\n2(4(AB)3(XY))10C 10\n1000(1000(1000(1000(1000(1000(NM)))))) 1889091\n0 0", "output": "0\nA\nX\nM\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\nqd ucyhf yi q fhycu dkcruh mxeiu... | [{"type": "stdin_stdout", "input": "10526\n", "output": "971513\n"}, {"type": "stdin_stdout", "input": "11183\n", "output": "999931\n"}, {"type": "stdin_stdout", "input": "10107\n", "output": "953077\n"}, {"type": "stdin_stdout", "input": "10476\n", "output": "969481\n"}, {"type": "stdin_stdout", "input": "10962\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\nYou are given a string S consist... | [{"type": "stdin_stdout", "input": "ataatmma\n", "output": "4\n"}, {"type": "stdin_stdout", "input": "aatltmaa", "output": "-1\n"}, {"type": "stdin_stdout", "input": "aamtltaa", "output": "-1\n"}, {"type": "stdin_stdout", "input": "aamaltta", "output": "-1\n"}, {"type": "stdin_stdout", "input": "attlamaa", "output": "-... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe prime numbers are not regula... | [{"input": "2\n10000000\n11000000", "output": "[[10000139, 10000141]]", "fn_name": "gap"}, {"input": "4\n30000\n100000", "output": "[[30109, 30113]]", "fn_name": "gap"}, {"input": "6\n30000\n100000", "output": "[[30091, 30097]]", "fn_name": "gap"}, {"input": "8\n30000\n100000", "output": "[[30161, 30169]]", "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\nProblem A Secret of Chocolate Po... | [{"type": "stdin_stdout", "input": "88 3", "output": "2971215071\n"}, {"type": "stdin_stdout", "input": "73 3", "output": "102334153\n"}, {"type": "stdin_stdout", "input": "68 4", "output": "3956574\n"}, {"type": "stdin_stdout", "input": "87 6", "output": "8427403\n"}, {"type": "stdin_stdout", "input": "72 4", "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\nIahub is so happy about inventin... | [{"type": "stdin_stdout", "input": "20\n-1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1\n", "output": "927799753\n"}, {"type": "stdin_stdout", "input": "10\n4 10 -1 1 6 8 9 2 -1 -1\n", "output": "4\n"}, {"type": "stdin_stdout", "input": "10\n3 10 -1 1 6 8 9 2 -1 -1\n", "output": "6\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\nDr. Akita, who lives in the neig... | [{"type": "stdin_stdout", "input": "1 1\n3 2\n3 1+2*3-4\n3 1|2^3&4\n3 (1+2)*3\n3 1-1-1-1\n0 #", "output": "91\n92\n273\n93\n279\n88\n"}, {"type": "stdin_stdout", "input": "1 1\n3 4\n3 1+2*3-4\n3 1|2^3&4\n3 (1+2)*3\n3 1-1-1-1\n0 #", "output": "91\n94\n273\n93\n279\n88\n"}, {"type": "stdin_stdout", "input": "1 1\n3 4\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 function alternateCase whi... | [{"input": "\"Jack JUMPED over THE CaNdLeStIcK\"", "output": "[\"jACK jumped OVER the cAnDlEsTiCk\"]", "fn_name": "alternateCase"}, {"input": "\"i LIKE MAKING KATAS VERY MUCH\"", "output": "[\"I like making katas very much\"]", "fn_name": "alternateCase"}, {"input": "\"HuMpTy DuMpTy SaT On A WaLl\"", "output": "[\"hUmP... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nTakahashi wants to print a docum... | [{"type": "stdin_stdout", "input": "1073", "output": "537\n"}, {"type": "stdin_stdout", "input": "100\n", "output": "50\n"}, {"type": "stdin_stdout", "input": "282", "output": "141\n"}, {"type": "stdin_stdout", "input": "557", "output": "279\n"}, {"type": "stdin_stdout", "input": "284", "output": "142\n"}, {"type": "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\nWrite a program which reads an i... | [{"type": "stdin_stdout", "input": "5", "output": "0 0\n0.411522633745 0.0\n0.617283950617 0.356389055055\n0.82304526749 0.0\n1.23456790123 0.0\n1.44032921811 0.356389055055\n1.23456790123 0.712778110111\n1.64609053498 0.712778110111\n1.85185185185 1.06916716517\n2.05761316872 0.712778110111\n2.46913580247 0.7127781101... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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\nGiven a positive inte... | [{"input": "8964631", "output": "[\"8*1000000+9*100000+6*10000+4*1000+6*100+3*10+1\"]", "fn_name": "simplify"}, {"input": "196587", "output": "[\"1*100000+9*10000+6*1000+5*100+8*10+7\"]", "fn_name": "simplify"}, {"input": "10104", "output": "[\"1*10000+1*100+4\"]", "fn_name": "simplify"}, {"input": "999", "output": "[\... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given an integer number ... | [{"type": "stdin_stdout", "input": "10000000000\n", "output": "5000000000\n"}, {"type": "stdin_stdout", "input": "10000000000\n", "output": "5000000000\n"}, {"type": "stdin_stdout", "input": "10000000010\n", "output": "5000000005\n"}, {"type": "stdin_stdout", "input": "10010000010\n", "output": "5005000005\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\nVictor tries to write his own te... | [{"type": "stdin_stdout", "input": "90\nbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\n", "output": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\n"}, {"type": "stdin_stdout", "input": "90\nbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb... | code_stdio |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.