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\nTaro came to a square to look fo... | [{"type": "stdin_stdout", "input": "5 5\n10 7\n-3 -8\n2 11\n6 0\n-1 3\n-3 1 3 13\n-1 -1 9 5\n-3 -16 10 11\n-1 0 5 4\n-1 -13 15 10", "output": "2\n2\n5\n1\n3\n"}, {"type": "stdin_stdout", "input": "5 5\n10 7\n-3 -8\n2 11\n10 0\n-1 3\n-3 1 3 13\n-1 -1 9 5\n-3 -16 12 11\n0 0 5 4\n-1 -13 15 10", "output": "2\n1\n5\n0\n3\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\nPasser ratings are the generally... | [{"input": "432\n3554\n291\n28\n2", "output": "[112.2]", "fn_name": "passer_rating"}, {"input": "48\n192\n19\n2\n3", "output": "[39.6]", "fn_name": "passer_rating"}, {"input": "34\n172\n20\n1\n1", "output": "[69.7]", "fn_name": "passer_rating"}, {"input": "5\n76\n4\n1\n0", "output": "[158.3]", "fn_name": "passer_rating... | 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 Berland recently a new collec... | [{"type": "stdin_stdout", "input": "5 100000000\n100000000 999999999 1 2 3\n", "output": "14138\n4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 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\nDecimal numbers are a common not... | [{"type": "stdin_stdout", "input": "7\n4\n0\n24\n10\n10010\n-1", "output": "13\n10\n0\n120\n22\n2130122\n"}, {"type": "stdin_stdout", "input": "7\n4\n1\n24\n10\n10010\n-1", "output": "13\n10\n1\n120\n22\n2130122\n"}, {"type": "stdin_stdout", "input": "7\n4\n0\n12\n16\n10000\n-1", "output": "13\n10\n0\n30\n100\n2130100\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 colleagues have been good e... | [{"input": "\"dog\"\n23", "output": "[\"pass out from excitement 23 times\"]", "fn_name": "present"}, {"input": "\"badpresent\"\n3", "output": "[\"Take this back!\"]", "fn_name": "present"}, {"input": "\"goodpresent\"\n9", "output": "[\"pxxmy{n|nw}\"]", "fn_name": "present"}, {"input": "\"crap\"\n10", "output": "[\"acp... | 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\nFind places where a string P is ... | [{"type": "stdin_stdout", "input": "aaaaab\naa", "output": "0\n1\n2\n3\n"}, {"type": "stdin_stdout", "input": "baaaaa\naa", "output": "1\n2\n3\n4\n"}, {"type": "stdin_stdout", "input": "aaabaa\naa", "output": "0\n1\n4\n"}, {"type": "stdin_stdout", "input": "baaaab\naa", "output": "1\n2\n3\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\nThe Smart Beaver from ABBYY bega... | [{"type": "stdin_stdout", "input": "120\n242 524 420 973 816 432 247 666 134 849 145 366 608 930 613 315 863 628 97 109 65 704 741 314 736 17 872 971 559 648 223 771 171 327 782 837 303 393 292 339 730 834 794 868 540 251 789 893 23 305 116 220 699 863 580 992 861 393 98 253 544 171 336 207 348 496 316 285 286 727 613 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSakuzyo - Imprinting\n\nA.R.C. M... | [{"type": "stdin_stdout", "input": "1\n100 52 99\n51 69 42 32 34 62 12 75 88 18 57 47 40 91 100 81 72 15 26 14 93 68 6 50 5 24 97 52 10 20 54 9 56 39 21 55 7 98 59 87 77 17 29 13 30 46 37 76 71 78 96 82 49 64 84 60 67 19 2 25 85 89 38 41 11 90 35 48 27 28 70 65 66 16 79 3 80 44 36 43 61 99 22 33 86 4 83 94 74 31 73 95 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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\nYes, your eyes are n... | [{"input": "\"Hello World!\"", "output": "[\"ELEEV VVOEE!\"]", "fn_name": "to_lover_case"}, {"input": "\"jrvz,\"", "output": "[\"OOOO,\"]", "fn_name": "to_lover_case"}, {"input": "\"LOVE\"", "output": "[\"EVOL\"]", "fn_name": "to_lover_case"}, {"input": "\"love\"", "output": "[\"EVOL\"]", "fn_name": "to_lover_case"}, {... | 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\nJon Snow is on the lookout for s... | [{"type": "stdin_stdout", "input": "8 10\n100\n200\n300\n400\n500\n600\n700\n800\n900\n1000\n", "output": "11\n13\n14\n15\n16\n16\n17\n18\n19\n20\n"}, {"type": "stdin_stdout", "input": "8 10\n100\n200\n300\n400\n500\n600\n700\n862\n900\n1000\n", "output": "11\n13\n14\n15\n16\n16\n17\n19\n19\n20\n"}, {"type": "stdin_std... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou have to create a method \"co... | [{"input": "[2147483647, 2147483646, 2147483645, 2147483644, 2147483643]\n[9]", "output": "[[2147483647, 9, 2147483646, 2147483645, 2147483644, 2147483643]]", "fn_name": "compound_array"}, {"input": "[0, 1, 2]\n[9, 8, 7, 6, 5, 4, 3, 2, 1, 0]", "output": "[[0, 9, 1, 8, 2, 7, 6, 5, 4, 3, 2, 1, 0]]", "fn_name": "compound_... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nGiven a sequence of integers a_1... | [{"type": "stdin_stdout", "input": "10\n2 2 4 3 2 4 4 2 4 2\n104\n3\n3\n1\n4\n1\n1\n4\n1\n1\n3\n1\n1\n4\n1\n1\n1\n4\n3\n1\n1\n4\n1\n1\n1\n1\n1\n4\n1\n1\n1\n4\n1\n1\n4\n1\n1\n1\n1\n1\n4\n4\n1\n3\n1\n4\n1\n1\n1\n4\n1\n2\n4\n1\n4\n1\n4\n1\n4\n3\n1\n2\n2\n4\n2\n1\n1\n2\n4\n4\n1\n2\n3\n1\n1\n4\n4\n4\n4\n4\n2\n2\n4\n1\n1\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\nRead problems statements in Mand... | [{"type": "stdin_stdout", "input": "3\n6\n2 4 5 0 1 2\n10\n0 2 5 5 2 3 4 14 1 3\n8\n9 9 13 19 23 10 18 12", "output": "3 0 1 2\n6 0 1 2 3 3 14\n5 9 9 10 12 23\n"}, {"type": "stdin_stdout", "input": "3\n6\n3 4 5 1 1 2\n10\n3 2 9 5 2 3 4 14 7 10\n8\n9 5 13 19 23 10 18 12", "output": "3 1 1 2\n6 2 2 3 4 7 10\n4 5 10 12 23... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nProblem\n\nGiven the integer n, ... | [{"type": "stdin_stdout", "input": "127", "output": "128\n"}, {"type": "stdin_stdout", "input": "255", "output": "256\n"}, {"type": "stdin_stdout", "input": "175", "output": "16\n"}, {"type": "stdin_stdout", "input": "101", "output": "2\n"}, {"type": "stdin_stdout", "input": "15", "output": "16\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\nWrite a function that accepts tw... | [{"input": "100\n80", "output": "[\"100 is greater than 80\"]", "fn_name": "no_ifs_no_buts"}, {"input": "45\n51", "output": "[\"45 is smaller than 51\"]", "fn_name": "no_ifs_no_buts"}, {"input": "100\n100", "output": "[\"100 is equal to 100\"]", "fn_name": "no_ifs_no_buts"}, {"input": "20\n19", "output": "[\"20 is grea... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\n# Task\n\nYou are a lonely frog.... | [{"input": "[0, -1, -2, -3, -4]\n4", "output": "[2]", "fn_name": "jumping"}, {"input": "[0, -1, -2, -3, -4]\n3", "output": "[0]", "fn_name": "jumping"}, {"input": "[0, -1, -2, -3, -4]\n2", "output": "[3]", "fn_name": "jumping"}, {"input": "[0, -1, -2, -3, -4]\n1", "output": "[0]", "fn_name": "jumping"}, {"input": "[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\nWe're giving away nice huge bags... | [{"type": "stdin_stdout", "input": "214\n1 2 2 1 1 1 2 2 2 2 1 1 1 2 2 2 2 2 2 1 2 1 1 2 2 1 1 2 2 2 2 1 2 2 2 1 1 2 2 2 1 1 2 2 1 2 2 2 1 1 2 1 1 2 1 1 1 2 2 2 2 1 2 2 2 1 2 1 2 1 1 2 2 1 1 2 1 2 2 2 2 2 2 2 1 2 1 2 2 1 2 2 2 1 2 2 1 2 2 1 2 2 2 2 1 2 2 2 1 1 2 2 2 2 2 2 1 2 2 2 2 1 1 1 2 2 2 1 2 1 2 1 1 2 1 1 1 2 2 2... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn the year 30XX, an expedition ... | [{"type": "stdin_stdout", "input": "25\nneihsokcpuziafoytisrevinu\nuniversityofaizupckoshhen", "output": "4\n"}, {"type": "stdin_stdout", "input": "25\nuniversityofaiztpckoshien\nuniversityofaizupbkoshhen", "output": "0\n"}, {"type": "stdin_stdout", "input": "25\nuniversityofaiztpckoshien\nnehhsokbpuziafoytisrevinu", "... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nNowadays all circuses in Berland... | [{"type": "stdin_stdout", "input": "129.400249 -44.695226\n122.278798 -53.696996\n44.828427 -83.507917\n", "output": "26227.478504758346\n"}, {"type": "stdin_stdout", "input": "115.715093 141.583620\n136.158119 -23.780834\n173.673212 64.802787\n", "output": "24043.740341410277\n"}, {"type": "stdin_stdout", "input": "-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\nYou are given $n$ numbers $a_1, ... | [{"type": "stdin_stdout", "input": "22\n99039804 -580368436 -694542422 231508622 -490965348 958087037 -570157955 560902976 -840005981 -1381720926 -708462966 639575552 119982241 -631099451 -154223559 102960509 -225552439 507250810 -712228569 989896753 1574991855 1\n", "output": "12773524192\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\nThere are times you recall a goo... | [{"type": "stdin_stdout", "input": "100 7\n0 1 1 1 0 5 6 6 8 8 9 11 12 11 8 0 0 14 6 16 7 21 15 23 15 24 0 0 0 28 0 29 26 27 19 1 0 21 37 32 40 30 37 34 39 38 34 38 0 0 41 24 45 47 0 33 46 26 31 0 21 57 57 18 63 63 20 59 65 56 68 0 30 55 55 0 70 43 59 49 59 79 66 74 0 11 65 0 80 63 0 84 73 49 73 81 0 86 76 20\n", "outp... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nVanya has a table consisting of ... | [{"type": "stdin_stdout", "input": "5\n4 11 20 20\n6 11 20 16\n5 1 33 15\n11 3 18 21\n3 2 14 21\n", "output": "1087\n"}, {"type": "stdin_stdout", "input": "5\n4 11 20 22\n6 11 20 16\n5 1 34 15\n11 3 18 21\n3 1 14 11\n", "output": "1028\n"}, {"type": "stdin_stdout", "input": "5\n4 11 20 38\n6 11 20 16\n5 2 19 15\n11 3 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 string of length 6 consisting ... | [{"type": "stdin_stdout", "input": "sippuu\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "coffee\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "dceett\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "otjjmm\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "zkrrcc\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 Floral Clock has been standi... | [{"type": "stdin_stdout", "input": "23333\n", "output": "259575428\n"}, {"type": "stdin_stdout", "input": "49997\n", "output": "645043850\n"}, {"type": "stdin_stdout", "input": "10492\n", "output": "914991759\n"}, {"type": "stdin_stdout", "input": "30000\n", "output": "583465411\n"}, {"type": "stdin_stdout", "input": "... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn telecomunications we use info... | [{"input": "\"10100011 00111001 11001100 01010100 10110110 00111111\"", "output": "[\"1010001 0011100 1100110 error error 0011111\"]", "fn_name": "parity_bit"}, {"input": "\"01101110 01100000 01010110 10001111 01100011\"", "output": "[\"error 0110000 0101011 error 0110001\"]", "fn_name": "parity_bit"}, {"input": "\"111... | 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\nLittle Artem found a grasshopper... | [{"type": "stdin_stdout", "input": "10\n>>>>>>>>><\n1 1 1 1 1 1 1 1 1 5\n", "output": "INFINITE\n"}, {"type": "stdin_stdout", "input": "10\n>>>>>>>>><\n1 1 1 1 1 1 1 1 1 1\n", "output": "INFINITE\n"}, {"type": "stdin_stdout", "input": "10\n>>>>>>>>>>\n1 1 1 1 1 1 1 1 1 100\n", "output": "FINITE\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\nGiven a positive number n > 1 fi... | [{"input": "782611830", "output": "[\"(2)(3**2)(5)(7**2)(11)(13)(17)(73)\"]", "fn_name": "primeFactors"}, {"input": "7775460", "output": "[\"(2**2)(3**3)(5)(7)(11**2)(17)\"]", "fn_name": "primeFactors"}, {"input": "342217392", "output": "[\"(2**4)(3)(11)(43)(15073)\"]", "fn_name": "primeFactors"}, {"input": "775878912"... | 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\n\nAOR Ika made a set $ ... | [{"type": "stdin_stdout", "input": "5\n2 1 3 4 5\n3 4 2 5 1", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "5\n1 2 3 4 5\n2 4 3 5 1", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "5\n1 3 2 4 5\n3 4 2 5 1", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "5\n2 1 3 4 5\n2 4 3 5 1", "output": "Yes\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nGiven a string containing a list... | [{"input": "\",,,,,1,2,3,,,4,,5,,,\"", "output": "[[1, 2, 3, 4, 5]]", "fn_name": "string_to_int_list"}, {"input": "\"21,12,23,34,45\"", "output": "[[21, 12, 23, 34, 45]]", "fn_name": "string_to_int_list"}, {"input": "\"-1,-2,3,-4,-5\"", "output": "[[-1, -2, 3, -4, -5]]", "fn_name": "string_to_int_list"}, {"input": "\"1... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere is a chain consisting of m... | [{"type": "stdin_stdout", "input": "10\n802 0 10\n814 0 4\n820 1 4\n826 1 4\n832 3 5\n838 9 5\n845 7 3\n849 10 3\n853 14 4\n857 18 3\n3\n0 0 5\n8 0 5\n8 8 5\n3\n0 0 5\n7 3 6\n16 1 5\n9\n-1 3 5\n8 0 8\n19 2 11\n23 14 6\n23 21 6\n23 28 6\n19 40 8\n8 42 8\n0 39 5\n11\n0 0 5\n8 0 5\n18 8 10\n8 16 5\n0 16 5\n-1 24 5\n3 32 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\nYou are given a sequence of $n$ ... | [{"type": "stdin_stdout", "input": "4\n3\n3 14 1\n5\n3 3 2 2 4\n6\n1 6 2 2 2 10\n5\n1 12 1 4 2\n", "output": "0\n0\n0\n0\n"}, {"type": "stdin_stdout", "input": "4\n3\n3 14 1\n5\n3 3 2 1 4\n6\n1 6 2 2 2 10\n5\n1 12 1 4 2\n", "output": "0\n0\n0\n0\n"}, {"type": "stdin_stdout", "input": "4\n3\n1 5 0\n5\n5 4 2 2 -1\n6\n0 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\nBandits appeared in the city! On... | [{"type": "stdin_stdout", "input": "100\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\n0 0 63 70 92 75 4 96 52 33 86 57 53 85 91 62 23 0 28 37 41 69 26 64 7 100 41 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\nStudent Andrey has been skipping... | [{"type": "stdin_stdout", "input": "8 8\n.#.#.#.#\n#.#.#.#.\n.#.#.#.#\n#.#.#.#.\n.#.#.#.#\n#.#.#.#.\n.#.#.#.#\n#.#.#.#.\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "8 8\n.#.#.#.#\n.#.#.#.#\n.#.#.#.#\n#.#.#.#.\n.#.#.#.#\n#.#.#.#.\n.#.#.#.#\n#.#.#.#.\n", "output": "NO\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\nDanny, the local Math Maniac, is... | [{"type": "stdin_stdout", "input": "41\n67695023 47580738 52676259 26530025 83455112 2392302 23011073 86422683 148437329 42852564 97383338 95729385 6219705 42027049 79082264 1205076 1191075 18025596 75651485 93690196 63851880 23817841 79285846 9296266 60979868 62770176 40911517 96687661 35967137 55930828 78662969 51939... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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, Tokitsukaze found an i... | [{"type": "stdin_stdout", "input": "1000000000000000000 20 365\n31881893160049984 103938857870698567 103962228223609431 140762820261865064 175962215264653912 239086305245565642 354522451098745823 383839975876242372 443471287955807705 478923027151493682 511195154588214957 619570919279066139 677571312513476877 7058647976... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 __moreZeros__ function ... | [{"input": "\"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_\"", "output": "[[\"a\", \"b\", \"d\", \"h\", \"p\", \"A\", \"B\", \"C\", \"D\", \"E\", \"F\", \"H\", \"I\", \"J\", \"L\", \"P\", \"Q\", \"R\", \"T\", \"X\", \"0\"]]", "fn_name": "more_zeros"}, {"input": "\"THEQUICKBROWNFOXJUMPSOVERTHELAZYDOG\... | 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 a secret agent from the ... | [{"type": "stdin_stdout", "input": "10 1\n3\n1", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "7 1\n6\n-1", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "11 1\n3\n1", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "6 2\n10\n3", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "7 1\n6\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\nNowadays, most of the internet a... | [{"type": "stdin_stdout", "input": "5\n3778 9170\n2657 6649\n4038 9722\n3392 7255\n4890 8961\n", "output": "6938.4627241726648\n"}, {"type": "stdin_stdout", "input": "5\n4787 9531\n3133 9597\n1754 9725\n4335 7124\n4269 7752\n", "output": "7046.2404831918329\n"}, {"type": "stdin_stdout", "input": "5\n2194 6947\n2062 824... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nValera loves his garden, where n... | [{"type": "stdin_stdout", "input": "24 1524\n16 934\n23 1940\n21 1447\n20 417\n24 1340\n22 1932\n13 775\n19 2918\n12 2355\n9 593\n11 2676\n3 1857\n16 868\n13 426\n18 1679\n22 991\n9 2728\n10 2497\n16 1221\n9 772\n23 2522\n24 982\n12 1431\n18 757\n", "output": "25893\n"}, {"type": "stdin_stdout", "input": "24 1524\n16 9... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given a complete undirec... | [{"type": "stdin_stdout", "input": "10\n0 1 100 100 100 100 100 100 100 100\n1 0 1 100 100 100 100 100 100 100\n100 1 0 1 100 100 100 100 100 100\n100 100 1 0 1 100 100 100 100 100\n100 100 100 1 0 1 100 100 100 100\n100 100 100 100 1 0 1 100 100 100\n100 100 100 100 100 1 0 1 100 100\n100 100 100 100 100 100 1 0 1 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\nOn a clear night, a boy, Campane... | [{"type": "stdin_stdout", "input": "8\n1 0 3 3 0 1 14 5\n7\n1 2 -1 8 12 1 5\n0", "output": "NO COLOR\nNO COLOR\n"}, {"type": "stdin_stdout", "input": "8\n1 0 3 3 0 1 14 5\n7\n1 2 -1 8 22 1 5\n0", "output": "NO COLOR\nNO COLOR\n"}, {"type": "stdin_stdout", "input": "8\n1 0 3 3 0 1 14 5\n7\n1 2 -1 8 13 1 5\n0", "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\nSanta has to send presents to th... | [{"type": "stdin_stdout", "input": "2\n3 3\n3 1 2\n3 2 1\n7 2\n2 1 7 3 4 5 6\n6 1\n", "output": "5\n14\n"}, {"type": "stdin_stdout", "input": "2\n3 3\n3 1 2\n3 2 1\n7 2\n2 1 7 3 4 5 6\n4 1\n", "output": "5\n10\n"}, {"type": "stdin_stdout", "input": "2\n3 3\n3 1 2\n3 2 1\n7 2\n4 1 7 3 2 5 4\n5 1\n", "output": "5\n12\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\nToday is the ticket release date... | [{"type": "stdin_stdout", "input": "3 57\n1 4\n1 -2\n1 2", "output": "171000\n24000\n-12000\n12000\n"}, {"type": "stdin_stdout", "input": "3 57\n1 3\n1 -2\n1 2", "output": "171000\n18000\n-12000\n12000\n"}, {"type": "stdin_stdout", "input": "3 16\n1 4\n1 -2\n1 5", "output": "48000\n24000\n-12000\n30000\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\nIn the speed skating badge test,... | [{"type": "stdin_stdout", "input": "70.02963720383003 94.72312922368101\n103.91489947609344 168.84078141503855", "output": "NA\nNA\n"}, {"type": "stdin_stdout", "input": "50.825010742906116 75.69989732783311\n82.26479437960049 146.33206365267094", "output": "D\nNA\n"}, {"type": "stdin_stdout", "input": "40.991466890252... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nImp is in a magic forest, where ... | [{"type": "stdin_stdout", "input": "2500\n", "output": "700393\n"}, {"type": "stdin_stdout", "input": "1216\n", "output": "160822\n"}, {"type": "stdin_stdout", "input": "2140\n", "output": "614785\n"}, {"type": "stdin_stdout", "input": "1488\n", "output": "239580\n"}, {"type": "stdin_stdout", "input": "1040\n", "output... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given array $a_1, a_2, \... | [{"type": "stdin_stdout", "input": "5\n4\n4 4 4 4\n4\n13 7 25 19\n6\n3 5 3 1 7 1\n1\n1\n5\n0 0 0 0 0\n", "output": "1 2 4 \n1 2 \n1 \n1 \n1 2 3 4 5 \n"}, {"type": "stdin_stdout", "input": "5\n4\n4 4 4 4\n4\n13 7 25 19\n6\n3 7 3 1 7 1\n1\n1\n5\n0 0 0 0 0\n", "output": "1 2 4\n1 2\n1 2\n1\n1 2 3 4 5\n"}, {"type": "stdin_... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe only difference between the ... | [{"type": "stdin_stdout", "input": "19\n1\n10\n100\n1000\n10000\n100000\n1000000\n10000000\n100000000\n1000000000\n10000000000\n100000000000\n1000000000000\n10000000000000\n100000000000000\n1000000000000000\n10000000000000000\n100000000000000000\n1000000000000000000\n", "output": "1\n4\n1\n4\n9\n2\n6\n2\n6\n8\n1\n1\n9\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nCreate a program of the square p... | [{"type": "stdin_stdout", "input": "2\n387\n615", "output": "Case 1:\n1497\n2410\n8081\n3025\n1506\n2680\n1824\n3269\n6863\n1007\nCase 2:\n3782\n3035\n2112\n4605\n2060\n2436\n9340\n2356\n5507\n3270\n"}, {"type": "stdin_stdout", "input": "2\n210\n567", "output": "Case 1:\n441\n1944\n7791\n6996\n9440\n1136\n2904\n4332\n7... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nInaka has a disc, the circumfere... | [{"type": "stdin_stdout", "input": "30000 28\n10601 1119\n11119 20601\n9493 25771\n14351 4869\n13101 3619\n23101 13619\n29869 9351\n6119 15601\n3101 23619\n1851 22369\n11851 2369\n8619 18101\n19579 12933\n18619 28101\n16851 7369\n8101 28619\n24869 4351\n24351 14869\n2690 6851\n9869 19351\n5601 26119\n3976 21301\n21851 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nVova has taken his summer practi... | [{"type": "stdin_stdout", "input": "94 3\n4 2 1 6 1 1 1 5 1 3 3 3 6 1 6 6 3 5 3 1 4 1 3 6 4 5 3 4 6 5 5 2 1 5 4 5 6 5 2 2 6 5 4 6 1 3 5 1 2 5 5 2 1 3 4 5 6 4 3 1 4 4 1 5 4 4 2 2 2 4 4 3 6 2 6 1 5 6 1 3 5 5 1 3 5 3 5 2 6 1 3 6 1 5\n5 6 3 5 4 1 4 6 3 1 4 4 3 3 6 2 1 1 4 6 4 2 4 1 3 1 5 3 6 2 5 6 1 6 6 2 2 2 2 5 2 6 1 4 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\nIn this kata, your task is to id... | [{"input": "[-67, -66, -64, -61, -57, -52, -46, -39, -31, -22, -12, -2, 7, 15, 22, 28, 33, 37, 40, 42, 43]", "output": "[[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]]", "fn_name": "find_pattern"}, {"input": "[4, 5, 7, 6, 4, 2, 3, 5, 4, 2, 3, 5, 4, 2, 0, 1, 3, 2, 0, 1, 3, 2, 0, -2, -1, 1, 0, -2]", "out... | 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 seems that Borya is seriously... | [{"type": "stdin_stdout", "input": "42\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n", "output": "83\n"}, {"type": "stdin_stdout", "input": "42\n1 2\n1 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\nConverting a normal (12-hour) ti... | [{"input": "12\n10\n\"am\"", "output": "[\"0010\"]", "fn_name": "to24hourtime"}, {"input": "12\n11\n\"am\"", "output": "[\"0011\"]", "fn_name": "to24hourtime"}, {"input": "12\n12\n\"am\"", "output": "[\"0012\"]", "fn_name": "to24hourtime"}, {"input": "12\n13\n\"am\"", "output": "[\"0013\"]", "fn_name": "to24hourtime"},... | 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\nDima has a birthday soon! It's a... | [{"type": "stdin_stdout", "input": "55\n73792\n39309\n73808\n47389\n34803\n87947\n32460\n14649\n70151\n35816\n8272\n78886\n71345\n61907\n16977\n85362\n0\n43792\n8118\n83254\n89459\n32230\n87068\n82617\n94847\n83528\n37629\n31438\n97413\n62260\n13651\n47564\n43543\n61292\n51025\n64106\n0\n19282\n35422\n19657\n95170\n102... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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\"Night gathers, and now my watc... | [{"type": "stdin_stdout", "input": "205\n5 5 3 3 6 2 9 3 8 9 6 6 10 8 1 5 3 3 1 2 9 9 9 3 9 10 3 9 8 3 5 6 6 4 6 9 2 9 10 9 5 6 6 7 4 2 6 3 4 1 10 1 7 2 7 7 3 2 6 5 5 2 9 3 8 8 7 6 6 4 2 2 6 2 3 5 7 2 2 10 1 4 6 9 2 3 7 2 2 7 4 4 9 10 7 5 8 6 5 3 6 10 2 7 5 6 6 8 3 3 9 4 3 5 7 9 3 2 1 1 3 2 1 9 3 1 4 4 10 2 5 5 8 1 4 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\nYou can obtain profits from fore... | [{"type": "stdin_stdout", "input": "6\n-10\n38\n2\n4\n-2\n8", "output": "48\n"}, {"type": "stdin_stdout", "input": "6\n-17\n38\n2\n4\n-2\n8", "output": "55\n"}, {"type": "stdin_stdout", "input": "6\n-17\n33\n2\n1\n-3\n8", "output": "50\n"}, {"type": "stdin_stdout", "input": "6\n-17\n61\n2\n1\n-3\n8", "output": "78\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\nSonya was unable to think of a s... | [{"type": "stdin_stdout", "input": "75\n392 593 98 1017 515 448 220 310 475 79 539 294 208 828 75 534 875 493 94 205 656 105 546 493 60 188 222 108 788 504 809 621 934 455 307 236 630 298 938 62 850 421 839 134 950 256 934 817 209 559 866 67 990 835 534 672 733 768 757 516 959 893 275 315 692 927 321 554 801 805 885 12... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 arithmeti... | [{"type": "stdin_stdout", "input": "2\n12 1 5\n42764 449743 2019", "output": "524160\n165266\n"}, {"type": "stdin_stdout", "input": "2\n12 1 5\n42764 376063 2019", "output": "524160\n455865\n"}, {"type": "stdin_stdout", "input": "2\n12 1 5\n23772 376063 2019", "output": "524160\n755257\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\nYou will be given a vector of st... | [{"input": "[\"turns\", \"out\", \"random\", \"test\", \"cases\", \"are\", \"easier\", \"than\", \"writing\", \"out\", \"basic\", \"ones\"]", "output": "[\"a***r***e\"]", "fn_name": "two_sort"}, {"input": "[\"bitcoin\", \"take\", \"over\", \"the\", \"world\", \"maybe\", \"who\", \"knows\", \"perhaps\"]", "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\nA revolution took place on the B... | [{"type": "stdin_stdout", "input": "50 50 50 49 26\n205 221 199 178 191 202 180 192 185 204 183 194 215 216 185 200 182 170 190 180 176 204 166 164 194 174\n", "output": "YES\naaaaabbbbccccddddeeffffgggghhhhiiiijjjjkkkkllllmmmmnnnnooooppppqqqqrrrrsssstttuuuvvvvwwwwxxxxyyyyzzz\naaaaabbbbccccddddeeffffgggghhhhiiiijjjjkkk... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nVova's family is building the Gr... | [{"type": "stdin_stdout", "input": "20\n10 5 2 3 5 7 7 9 4 9 9 4 9 7 7 5 3 2 5 10\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "14\n7 7 7 4 3 3 4 5 4 4 5 7 7 7\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "14\n7 7 7 4 3 3 4 5 4 8 5 7 7 7\n", "output": "YES\n"}, {"type": "stdin_stdout", "input"... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nDenis, after buying flowers and ... | [{"type": "stdin_stdout", "input": "10 10\n1101001\n0110000\n0111010\n0010000\n1010000\n0111000\n1011011\n1010010\n1101011\n1111110\n", "output": "9941743758\n"}, {"type": "stdin_stdout", "input": "10 10\n0101111\n0000000\n1111011\n1011011\n1011011\n1111011\n0010010\n1010010\n1101111\n0000000\n", "output": "8993391761\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 programing contest na... | [{"type": "stdin_stdout", "input": "3\n1000000\n999999 999998\n999997 999996 999995\n999994 999993 999992 999991\n999990 999989 999988 999987 999986\n", "output": "2 1 4 3 6 5\n"}, {"type": "stdin_stdout", "input": "3\n1000000\n999999 999998\n999997 999996 999995\n999994 999993 999992 999991\n999990 999989 999988 99998... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAlex, Bob and Carl will soon par... | [{"type": "stdin_stdout", "input": "100\n2\n3\n1\n2\n3\n3\n3\n1\n1\n1\n1\n3\n3\n3\n3\n1\n2\n3\n3\n3\n3\n3\n3\n3\n1\n2\n2\n2\n3\n1\n1\n3\n3\n3\n3\n3\n3\n3\n3\n1\n2\n3\n3\n3\n1\n1\n1\n1\n3\n3\n3\n3\n1\n2\n3\n1\n2\n2\n2\n3\n3\n2\n1\n3\n3\n1\n2\n3\n1\n1\n1\n2\n2\n2\n3\n1\n1\n1\n1\n1\n1\n3\n2\n2\n2\n2\n2\n2\n3\n1\n2\n2\n2\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\nGiven an integer $x$. Your task ... | [{"type": "stdin_stdout", "input": "1000002 1000002 1000003 1000000000000\n", "output": "999998\n"}, {"type": "stdin_stdout", "input": "1000002 1000002 1000003 1000000000000\n", "output": "999998\n"}, {"type": "stdin_stdout", "input": "693528 398514 1000003 1000000000000\n", "output": "999995\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\nImplement `String#ipv4_address?`... | [{"input": "\"255.255.255.255\"", "output": "[true]", "fn_name": "ipv4_address"}, {"input": "\"10.256.30.40\"", "output": "[false]", "fn_name": "ipv4_address"}, {"input": "\"10.20.030.40\"", "output": "[false]", "fn_name": "ipv4_address"}, {"input": "\"127.0.0.0.1\"", "output": "[false]", "fn_name": "ipv4_address"}, {"... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAfter rejecting 10^{100} data st... | [{"type": "stdin_stdout", "input": "1\nAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\n", "output": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\n"}, {"type": "stdin_stdout", "input": "4\nANTON\nNAAN\nAAAAAA\nOAANTTON\n", "output": "\nNNOTA\nAANN\nAAAAAA\nTNNTAOOA\n"}, {... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAs a token of his gratitude, Tak... | [{"type": "stdin_stdout", "input": "1000000000000000000 1000000000000000000\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "314159265 358979323846264338\n", "output": "31\n"}, {"type": "stdin_stdout", "input": "275278675 992237867823568722\n", "output": "32\n"}, {"type": "stdin_stdout", "input": "10000 1099511... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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. Frugal bought a new house. H... | [{"type": "stdin_stdout", "input": "4 3\n0 1 1 1\n1 1 1 1\n1 1 1 1\n8 5\n0 1 1 1 1 1 1 1\n1 1 1 1 1 1 1 1\n1 0 1 1 1 1 1 1\n1 1 0 0 1 1 1 1\n0 1 1 1 0 1 1 1\n8 8\n0 1 1 0 0 1 1 0\n1 1 1 1 1 1 1 1\n1 1 1 1 1 1 1 1\n0 1 1 0 0 1 1 0\n0 1 1 0 0 1 1 0\n1 1 1 1 1 1 1 1\n1 1 1 1 1 1 1 1\n0 1 1 0 0 1 1 0\n10 10\n1 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\nThe purpose of this series is de... | [{"input": "[[1, 0.6], [2, 0.1001], [3, 0.0999], [4, 0.1], [5, 0.05], [6, 0.05]]\n3\n4", "output": "[\"0.20\"]", "fn_name": "mutually_exclusive"}, {"input": "[[1, 0.1], [2, 0.14], [3, 0.16], [4, 0.2], [5, 0.15], [6, 0.25]]\n1\n4", "output": "[\"0.30\"]", "fn_name": "mutually_exclusive"}, {"input": "[[6, 0.25], [1, 0.1]... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA Narcissistic Number is a numbe... | [{"input": "115132219018763992565095597973971522401", "output": "[true]", "fn_name": "is_narcissistic"}, {"input": "4679307774", "output": "[true]", "fn_name": "is_narcissistic"}, {"input": "146511208", "output": "[true]", "fn_name": "is_narcissistic"}, {"input": "472335975", "output": "[true]", "fn_name": "is_narcissi... | 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\nDima and his friends have been p... | [{"type": "stdin_stdout", "input": "100\n3 3 1 4 2 4 4 3 1 5 1 1 4 4 3 4 4 3 5 4 5 2 4 3 4 1 2 4 5 4 2 1 5 4 1 1 4 3 2 4 1 2 1 4 4 5 5 4 4 5 3 2 5 1 4 2 2 1 1 2 5 2 5 1 5 3 1 4 3 2 4 3 2 2 4 5 5 1 2 3 1 4 1 2 2 2 5 5 2 3 2 4 3 1 1 2 1 2 1 2\n", "output": "5\n"}, {"type": "stdin_stdout", "input": "100\n2 1 1 3 5 4 4 2 3... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWe all know the impressive story... | [{"type": "stdin_stdout", "input": "123 54564\n38 44 41 42 59 3 95 15 45 32 44 69 35 83 94 57 65 85 64 47 24 20 34 86 26 91 98 12 36 96 80 4 70 40 95 38 70 22 58 50 34 84 80 45 14 60 61 43 11 56 19 59 50 63 35 15 97 98 27 13 9 71 32 18 90 10 2 99 75 87 74 83 79 37 89 3 49 27 92 95 49 1 26 82 72 75 81 37 60 98 28 28 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\nYou are given two positive integ... | [{"input": "999\n2500", "output": "[[2222, 2223, 2225, 2227, 2232, 2233, 2235, 2252, 2253, 2255, 2257, 2272, 2275, 2277, 2322, 2323, 2325, 2327, 2332, 2335, 2337, 2352, 2353, 2355, 2372, 2373, 2375]]", "fn_name": "not_primes"}, {"input": "500\n999", "output": "[[522, 525, 527, 532, 533, 535, 537, 552, 553, 555, 572, 57... | 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 Berland each high school stud... | [{"type": "stdin_stdout", "input": "100\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\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 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 star is a figure of the follow... | [{"type": "stdin_stdout", "input": "100 3\n.*.\n***\n***\n***\n***\n***\n***\n***\n***\n***\n***\n***\n***\n***\n***\n***\n***\n***\n***\n***\n***\n***\n***\n***\n***\n***\n***\n***\n***\n***\n***\n***\n***\n***\n***\n***\n***\n***\n***\n***\n***\n***\n***\n***\n***\n***\n***\n***\n***\n***\n***\n***\n***\n***\n***\n**... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nMothers arranged a dance party f... | [{"input": "\"AaaaaZazzz\"", "output": "[\"AaaaaaZzzz\"]", "fn_name": "find_children"}, {"input": "\"CbcBcbaA\"", "output": "[\"AaBbbCcc\"]", "fn_name": "find_children"}, {"input": "\"xXfuUuuF\"", "output": "[\"FfUuuuXx\"]", "fn_name": "find_children"}, {"input": "\"abBA\"", "output": "[\"AaBb\"]", "fn_name": "find_chi... | 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\nDo you know the story about the ... | [{"type": "stdin_stdout", "input": "30\n34938093 71279712 25853338\n29827587 21741565 52179990 30235076 83272806 10815432 98887688 94542207 99870240 97586453 21739186 30460781 75347784 50711354 12162179 74306503 97398492 88466481 52489587 67579359 53177356 75077523 86044366 14405531 73916272 78242091 49321886 41937821 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 series:\n... | [{"input": "100", "output": "[103]", "fn_name": "find_num"}, {"input": "500", "output": "[476]", "fn_name": "find_num"}, {"input": "11", "output": "[22]", "fn_name": "find_num"}, {"input": "1", "output": "[1]", "fn_name": "find_num"}, {"input": "5", "output": "[5]", "fn_name": "find_num"}] | 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\nKostya likes Codeforces contests... | [{"type": "stdin_stdout", "input": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nPolycarpus got an internship in ... | [{"type": "stdin_stdout", "input": "10 3 30000\n00:06:54\n00:42:06\n03:49:45\n04:38:35\n05:33:30\n05:51:46\n10:46:34\n14:34:59\n14:40:06\n14:53:13\n", "output": "6\n1\n2\n3\n3\n3\n3\n4\n5\n6\n6\n"}, {"type": "stdin_stdout", "input": "10 3 30000\n00:06:54\n00:42:06\n03:49:45\n04:38:35\n05:33:30\n05:51:46\n10:46:34\n14: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\nYou are given four digits N_1, N... | [{"type": "stdin_stdout", "input": "-1 3 13 -1", "output": "NO\n"}, {"type": "stdin_stdout", "input": "-1 2 13 -1", "output": "NO\n"}, {"type": "stdin_stdout", "input": "-1 2 17 -1", "output": "NO\n"}, {"type": "stdin_stdout", "input": "-1 2 -1 24", "output": "NO\n"}, {"type": "stdin_stdout", "input": "-1 2 17 -2", "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\nYou are given two strings $s$ an... | [{"type": "stdin_stdout", "input": "11 3 66\nssszzzzsssz\nsss\n1 1\n1 2\n2 2\n1 3\n2 3\n3 3\n1 4\n2 4\n3 4\n4 4\n1 5\n2 5\n3 5\n4 5\n5 5\n1 6\n2 6\n3 6\n4 6\n5 10\n6 6\n1 7\n2 7\n3 7\n4 7\n5 7\n6 7\n7 7\n1 8\n2 8\n3 8\n4 8\n5 8\n6 8\n7 8\n8 8\n1 9\n2 9\n3 9\n4 9\n5 9\n6 9\n7 9\n8 9\n9 9\n1 10\n2 10\n3 10\n4 10\n5 10\n6... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWhile Vasya finished eating his ... | [{"type": "stdin_stdout", "input": "100 2 1\n1 2 2 2 1 2 1 2 2 2 2 1 2 1 1 2 1 2 2 1 1 2 1 1 2 2 1 1 2 1 2 2 2 2 2 1 1 1 2 1 2 1 2 1 2 1 2 2 1 2 2 2 1 1 1 2 2 1 1 2 2 1 1 1 1 1 1 2 2 1 1 2 2 1 2 2 1 2 1 2 2 1 2 1 1 1 2 2 1 1 2 1 2 2 1 1 2 2 2 1\n", "output": "5200\n"}, {"type": "stdin_stdout", "input": "100 2 1\n1 2 2 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLittle Petya very much likes gif... | [{"type": "stdin_stdout", "input": "100\n42 23 48 88 36 6 18 70 96 1 34 40 46 22 39 55 85 93 45 67 71 75 59 9 21 3 86 63 65 68 20 38 73 31 84 90 50 51 56 95 72 33 49 19 83 76 54 74 100 30 17 98 15 94 4 97 5 99 81 27 92 32 89 12 13 91 87 29 60 11 52 43 35 58 10 25 16 80 28 2 44 61 8 82 66 69 41 24 57 62 78 37 79 77 53 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\nE869120 found a chest which is l... | [{"type": "stdin_stdout", "input": "??p??d??\nabc\n", "output": "UNRESTORABLE\n"}, {"type": "stdin_stdout", "input": "?tc??@?\ncoder", "output": "UNRESTORABLE\n"}, {"type": "stdin_stdout", "input": "?tc??@?\ncnder", "output": "UNRESTORABLE\n"}, {"type": "stdin_stdout", "input": "?tc??@?\nendcr", "output": "UNRESTORABLE... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\n## Introduction\n\n\nEach chemic... | [{"input": "\"Br\"", "output": "[\"Br -> 1s2 2s2 2p6 3s2 3p6 3d10 4s2 4p5\"]", "fn_name": "get_electron_configuration"}, {"input": "\"Cr\"", "output": "[\"Cr -> 1s2 2s2 2p6 3s2 3p6 3d5 4s1\"]", "fn_name": "get_electron_configuration"}, {"input": "\"V\"", "output": "[\"V -> 1s2 2s2 2p6 3s2 3p6 3d3 4s2\"]", "fn_name": "g... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nToday we will be playing a red a... | [{"type": "stdin_stdout", "input": "3\n4 6\n.R....\n......\n......\n.W....\n4 4\nR..W\n....\n....\n....\n5 1\nR\nW\nR\nW\nR\n", "output": "YES\nWRWRWR\nRWRWRW\nWRWRWR\nRWRWRW\nYES\nRWRW\nWRWR\nRWRW\nWRWR\nYES\nR\nW\nR\nW\nR\n"}, {"type": "stdin_stdout", "input": "3\n4 6\n.R....\n......\n......\n.W....\n4 4\n.R.W\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\nGood evening, contestants.\n\nIf... | [{"type": "stdin_stdout", "input": "367 186 151\n179 10 203\n271 37 39\n103 230 1\n27 104 285\n253 50 85\n1 1 1\n9075 337 210\n307 40 79\n331 221 177\n259 170 40\n269 75 102\n0 0 0", "output": "92809\n6709\n12037\n103\n153739\n14503\n2\n899429\n10667\n412717\n22699\n38669\n"}, {"type": "stdin_stdout", "input": "367 186... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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\nThere are $ N $ Amida... | [{"type": "stdin_stdout", "input": "3\n3 -1 0\n0 1\n1 2 -1 1 2 0", "output": "yes\n"}, {"type": "stdin_stdout", "input": "3\n3 -1 0\n0 1\n1 2 -1 1 2 1", "output": "yes\n"}, {"type": "stdin_stdout", "input": "3\n3 -1 0\n0 1\n1 2 -1 1 3 1", "output": "yes\n"}, {"type": "stdin_stdout", "input": "3\n3 -1 0\n0 1\n1 2 -1 2 3... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nArray inversion indicates how fa... | [{"input": "[6, 5, 4, 3, 3, 3, 3, 2, 1]", "output": "[30]", "fn_name": "count_inversions"}, {"input": "[6, 5, 4, 3, 2, 1]", "output": "[15]", "fn_name": "count_inversions"}, {"input": "[1, 2, 3]", "output": "[0]", "fn_name": "count_inversions"}, {"input": "[2, 1, 3]", "output": "[1]", "fn_name": "count_inversions"}, {"... | 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 statement\n\nN first-yea... | [{"type": "stdin_stdout", "input": "89 111", "output": "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 0 0 0 0 0 0 0 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 11... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 palindrome is a string $t$ whi... | [{"type": "stdin_stdout", "input": "11\n4\n0\n1\n1\n0\n2\n0001000\n0000000000000\n2\n1\n0\n1\n1\n1\n0\n2\n11\n00\n2\n111\n000\n2\n111\n00\n2\n00\n111\n2\n11111\n00\n2\n00000100000\n000\n", "output": "4\n2\n2\n1\n1\n2\n2\n2\n2\n2\n2\n"}, {"type": "stdin_stdout", "input": "11\n4\n0\n1\n1\n0\n2\n0001000\n0000000000000\n2\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSearch trees are data structures... | [{"type": "stdin_stdout", "input": "8\ninsert 30\ninsert 113\ninsert 18\ninsert 1\ninsert 20\ninsert 17\ninsert 25\nprint", "output": " 1 17 18 20 25 30 113\n 30 18 1 17 20 25 113\n"}, {"type": "stdin_stdout", "input": "8\ninsert 30\ninsert 166\ninsert 12\ninsert 1\ninsert 20\ninsert 17\ninsert 19\nprint", "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\nTaro is going to play a card gam... | [{"type": "stdin_stdout", "input": "47\nS 10\nS 11\nS 12\nS 13\nH 1\nH 2\nS 6\nS 7\nS 8\nS 9\nH 6\nH 8\nH 9\nH 10\nH 11\nH 4\nH 7\nS 2\nS 3\nS 4\nS 5\nH 12\nH 13\nC 1\nC 2\nD 1\nD 2\nD 3\nD 4\nD 5\nD 6\nD 7\nC 3\nC 4\nC 5\nC 6\nC 7\nC 8\nC 9\nC 10\nC 11\nC 13\nD 9\nD 10\nD 11\nD 12\nD 13", "output": "S 1\nH 3\nH 5\nC 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\nChaneka has a hobby of playing w... | [{"type": "stdin_stdout", "input": "2\n4 0 0 1\n0 0 1 0\n", "output": "Tidak Tidak Tidak Ya\nTidak Tidak Ya Tidak\n"}, {"type": "stdin_stdout", "input": "2\n4 0 0 1\n0 1 1 0\n", "output": "Tidak Tidak Tidak Ya\nTidak Ya Tidak Tidak\n"}, {"type": "stdin_stdout", "input": "2\n2 0 0 1\n0 1 0 0\n", "output": "Tidak Tidak 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\nJust in case somebody missed it:... | [{"type": "stdin_stdout", "input": "1984 1110 1992\n", "output": "102579360\n"}, {"type": "stdin_stdout", "input": "1984 1847 1992\n", "output": "345702953"}, {"type": "stdin_stdout", "input": "1000 1000 1000\n", "output": "850431726"}, {"type": "stdin_stdout", "input": "1999 2000 2000\n", "output": "675798323"}, {"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\nWrite a function that takes a st... | [{"input": "\"limbojackassin the garden\"", "output": "[[\"a\", \"s\", \"i\", \" \", \"e\", \"n\"]]", "fn_name": "remember"}, {"input": "\"kamehameha\"", "output": "[[\"a\", \"m\", \"e\", \"h\"]]", "fn_name": "remember"}, {"input": "\"11 pinguin\"", "output": "[[\"1\", \"i\", \"n\"]]", "fn_name": "remember"}, {"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\nZS the Coder has drawn an undire... | [{"type": "stdin_stdout", "input": "7 9 999999999 0 3\n0 1 0\n1 2 0\n2 3 0\n0 4 1\n4 1 1\n1 5 499999999\n5 2 499999999\n2 6 1\n6 3 1\n", "output": "YES\n0 1 1\n1 2 999999996\n2 3 999999997\n0 4 1\n4 1 1\n1 5 499999999\n5 2 499999999\n2 6 1\n6 3 1\n"}, {"type": "stdin_stdout", "input": "7 9 999999999 0 3\n0 1 0\n1 2 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\nSchool holidays come in Berland.... | [{"type": "stdin_stdout", "input": "100 50\n1 8\n9 12\n13 19\n20 22\n23 27\n28 31\n32 36\n36 40\n40 43\n47 47\n48 51\n51 55\n62 63\n69 77\n77 84\n85 90\n98 99\n100 100\n100 100\n100 100\n100 100\n100 100\n100 100\n100 100\n100 100\n100 100\n100 100\n100 100\n100 100\n100 100\n100 100\n100 100\n100 100\n100 100\n100 100... | code_stdio |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.