messages
listlengths
1
1
ground_truth
stringlengths
88
726k
dataset
stringclasses
2 values
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWe all know that a superhero can...
[{"type": "stdin_stdout", "input": "eieoiiieaiuiiauieeuoueeoudljpjrpxdtqkrdfmhktpqrnkmyggywglpfpfmhrbaiioeuaieaouaoioaiuoiuueuaoouaeeoaaaueauueeiuaueuaeouiaaaieeaeiuouoiooauuoeauaiaoouuauuuuocqschpcxrxrgrcsjmwcbyfvtdxqtwha\naoeaoaoueieeioooiaooeoeoitvplxwkprykbhvxylcnxrhpgqclyjgfpzdpqwlcvouooeueoouieioeuouieoaaueuiiiae...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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\n**_Given_** a **_Divis...
[{"input": "37\n200", "output": "[185]", "fn_name": "max_multiple"}, {"input": "10\n50", "output": "[50]", "fn_name": "max_multiple"}, {"input": "7\n100", "output": "[98]", "fn_name": "max_multiple"}, {"input": "7\n17", "output": "[14]", "fn_name": "max_multiple"}, {"input": "3\n10", "output": "[9]", "fn_name": "max_mu...
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\nPolycarp is flying in the airpla...
[{"type": "stdin_stdout", "input": "5\n\n3 3\n1 1 1\n0 0\n0 1\n\n3 3\n1 1 1\n1 0\n2 1\n\n3 3\n1 1 1\n1 0\n0 1\n\n3 3\n1 1 1\n0 0\n1 0\n\n3 3\n1 1 1\n0 0\n1 1\n", "output": "YYY\nYYN\nYYY\nYYY\nYYY\n"}, {"type": "stdin_stdout", "input": "5\n\n3 3\n1 1 1\n0 0\n0 1\n\n3 3\n1 1 1\n1 0\n2 1\n\n3 3\n1 1 1\n1 0\n0 1\n\n3 3\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\nToday's morning was exceptionall...
[{"type": "stdin_stdout", "input": "71 100\n56 44\n12 85\n", "output": "5053\n"}, {"type": "stdin_stdout", "input": "46 100\n36 81\n99 28\n", "output": "4961\n"}, {"type": "stdin_stdout", "input": "29 100\n30 51\n28 92\n", "output": "5021\n"}, {"type": "stdin_stdout", "input": "93 80\n13 49\n100 21\n", "output": "3220\...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 set of n points ...
[{"type": "stdin_stdout", "input": "50\n-38 -107\n-34 -75\n-200 -143\n-222 -139\n-34 55\n-102 -79\n48 -99\n2 -237\n-118 -167\n-56 -41\n10 17\n68 -89\n-32 41\n-100 -93\n84 -1\n86 -15\n46 -145\n-58 -117\n8 31\n-36 -61\n-12 21\n-116 79\n88 -205\n70 -103\n-78 -37\n106 -5\n-96 -201\n-60 -103\n-54 45\n-138 -177\n-178 -47\n-1...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are a teacher at a cram scho...
[{"type": "stdin_stdout", "input": "2 6\n1 16\n3 9\n2 334\n34 79\n0 0", "output": "0 1\n4 0\n0 1\n0 166\n0 13\n"}, {"type": "stdin_stdout", "input": "3 8\n1 5\n3 10\n2 218\n36 198\n0 0", "output": "3 0\n1 0\n1 0\n0 108\n0 2\n"}, {"type": "stdin_stdout", "input": "2 6\n1 16\n3 15\n2 200\n34 62\n0 0", "output": "0 1\n4 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\nYou are given positive integers ...
[{"type": "stdin_stdout", "input": "100 100 1\n", "output": "100\n"}, {"type": "stdin_stdout", "input": "100 50 4\n", "output": "5\n"}, {"type": "stdin_stdout", "input": "96 96 12\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "60 60 11\n", "output": "2\n"}, {"type": "stdin_stdout", "input": "93 31 1\n", "outp...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nDreamoon has a string s and a pa...
[{"type": "stdin_stdout", "input": "a\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn this Kata, you will be given ...
[{"input": "\"qponmlkjihgfeeiefghijklmnopqrsttsr\"", "output": "[false]", "fn_name": "solve"}, {"input": "\"432612345665\"", "output": "[false]", "fn_name": "solve"}, {"input": "\"223456776543\"", "output": "[true]", "fn_name": "solve"}, {"input": "\"zazcbaabc\"", "output": "[true]", "fn_name": "solve"}, {"input": "\"a...
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 Nastya has a hobby, she l...
[{"type": "stdin_stdout", "input": "aaaaaaaadbaaabbbbbddaaabdadbbbbbdbbabbbabaabdbbdababbbddddbdaabbddbbbbabbbbbabadaadabaaaadbbabbbaddb\naaaaaaaaaaaaaa\n61 52 5 43 53 81 7 96 6 9 34 78 79 12 8 63 22 76 18 46 41 56 3 20 57 21 75 73 100 94 35 69 32 4 70 95 88 44 68 10 71 98 23 89 36 62 28 51 24 30 74 55 27 80 38 48 93 1...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\n## Task:\n\nYou have to write a ...
[{"input": "27", "output": "[\"777777777777777777777777777\\n766666666666666666666666666\\n765555555555555555555555555\\n765444444444444444444444444\\n765433333333333333333333333\\n765432222222222222222222222\\n765432111111111111111111111\\n765432100000000000000000000\\n765432109999999999999999999\\n7654321098888888888...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nEmuskald is an avid horticulturi...
[{"type": "stdin_stdout", "input": "20 15\n6 8719.787178\n10 13066.663722\n15 58623.690996\n9 184321.819759\n3 227999.294560\n2 279836.330518\n9 282806.308675\n8 311056.507765\n1 312315.562927\n5 459200.373445\n14 563454.265947\n7 647364.984868\n13 679762.0281866578\n4 684192.647497\n1 733119.607626\n7 748637.778398\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\nThe Rebel fleet is afraid that t...
[{"type": "stdin_stdout", "input": "10 10\n8530 -3814\n-9330 -6035\n3951 -217\n-9276 8291\n636 -3118\n5024 -2403\n4601 7977\n-3620 -1428\n4954 -9632\n-9852 6553\n-3457 5430\n-8866 -7343\n1020 -5748\n5043 -3820\n-2832 1528\n-5058 -825\n2406 -3530\n9152 -7463\n-8547 7108\n2492 8953\n", "output": "Yes\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\nInput Format\n\n\nN K\na_1 a_2 a...
[{"type": "stdin_stdout", "input": "5 5\n11683 3774 3598 4173 3424", "output": "31773\n"}, {"type": "stdin_stdout", "input": "5 4\n11683 3774 3598 4173 3424", "output": "23510\n"}, {"type": "stdin_stdout", "input": "5 5\n3949 3208 13644 3469 3424", "output": "21140\n"}, {"type": "stdin_stdout", "input": "5 5\n4931 3208...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nMake a function that returns the...
[{"input": "\"RyanIsCool\"", "output": "[\"Error\"]", "fn_name": "problem"}, {"input": "\"hello\"", "output": "[\"Error\"]", "fn_name": "problem"}, {"input": "1.2", "output": "[66]", "fn_name": "problem"}, {"input": "5", "output": "[256]", "fn_name": "problem"}, {"input": "3", "output": "[156]", "fn_name": "problem"}, ...
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\nImplement `String#parse_mana_cos...
[{"input": "\"1wubrg\"", "output": "[{\"*\": 1, \"w\": 1, \"u\": 1, \"b\": 1, \"r\": 1, \"g\": 1}]", "fn_name": "parse_mana_cost"}, {"input": "\"3wubrg\"", "output": "[{\"*\": 3, \"w\": 1, \"u\": 1, \"b\": 1, \"r\": 1, \"g\": 1}]", "fn_name": "parse_mana_cost"}, {"input": "\"wwuubbrrgg\"", "output": "[{\"w\": 2, \"u\":...
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\nConsider a table G of size n × m...
[{"type": "stdin_stdout", "input": "1000000000000 1000000000000 116\n1587924000 7 2 3 4 5 6 1 56 9 10 1 12 13 2 105 16 1 18 1 620 3 14 1 24 25 26 27 4 203 30 1 32 3 2 5 252 1 2 39 40 1 6 7 4 45 2 1 48 1 350 93 52 1 54 5 8 21 58 1 60 1 2 9 224 65 6 1 4 3 10 7 72 1 2 75 4 1 546 1 80 81 62 1 12 35 2 87 8 1 90 13 28 3 2 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\nFox Ciel saw a large field while...
[{"type": "stdin_stdout", "input": "31 31 31 4\n15 26\n29 15\n17 31\n29 21\n21 3\n9 27\n19 20\n8 19\n5 4\n1 16\n6 17\n5 24\n1 4\n27 30\n16 24\n14 29\n24 31\n6 20\n2 20\n12 26\n26 15\n23 8\n29 10\n11 8\n3 7\n2 26\n15 10\n15 24\n6 10\n31 22\n12 2\n10 3\n6 24\n23 12\n19 1\n", "output": "Grapes\nCarrots\nCarrots\nCarrots\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\nAn open-top box having a square ...
[{"type": "stdin_stdout", "input": "5 12\n70 66 70\n0 52 20\n15 27 10\n78 45 10\n20 60 13\n1 100\n54 75 200\n1 10\n90 14 1\n1 11\n54 149 200\n3 10\n53 60 0\n61 38 1\n45 44 1\n4 10\n20 21 10\n20 80 10\n80 20 10\n140 80 10\n0 0", "output": "44.661667\n39.000000\n130.000000\n102.978551\n107.095894\n99.314575\n"}, {"type":...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere are $n$ people in this wor...
[{"type": "stdin_stdout", "input": "12 20\n1 3 1000000000\n3 2 1000000000\n1 4 1000000000\n4 2 1000000000\n1 5 1000000000\n5 2 1000000000\n1 6 1000000010\n6 2 1000000000\n1 7 1000000000\n7 2 1000000000\n1 8 1000000000\n8 4 1000000000\n1 9 1000000000\n9 2 1000000000\n1 10 1000000000\n10 2 1000000000\n1 11 1000000000\n11...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nTic-tac-toe is a game in which y...
[{"type": "stdin_stdout", "input": "ooosxssxs\nxooswsosx\nooxxxooxo", "output": "o\nd\nd\n"}, {"type": "stdin_stdout", "input": "oopsxssxs\nxooswsosx\noxooxxxoo", "output": "d\nd\nd\n"}, {"type": "stdin_stdout", "input": "oopsxrsxs\nxsoswsoox\nooooxxxox", "output": "d\nd\no\n"}, {"type": "stdin_stdout", "input": "xprmn...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA new agent called Killjoy inven...
[{"type": "stdin_stdout", "input": "7\n2 7\n7 1313\n2 14\n8 1211\n2 9\n12 121\n2 121\n121 312\n2 121\n136 121\n2 7\n1313 7\n2 8\n1211 8\n", "output": "1\n2\n2\n1\n1\n1\n1\n"}, {"type": "stdin_stdout", "input": "7\n2 7\n7 1313\n2 8\n8 1211\n2 9\n12 121\n2 121\n121 312\n2 121\n312 121\n2 7\n1313 7\n2 8\n1211 8\n", "outpu...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given a graph with 3 ⋅ n...
[{"type": "stdin_stdout", "input": "1\n8 39\n1 2\n3 4\n5 6\n7 8\n1 9\n3 10\n3 11\n5 12\n5 13\n10 14\n7 15\n9 4\n10 2\n11 2\n12 1\n13 3\n14 2\n15 2\n9 4\n10 4\n11 4\n12 4\n13 4\n14 4\n15 4\n14 6\n10 6\n11 6\n12 6\n13 6\n14 6\n15 6\n9 8\n7 8\n11 8\n12 14\n13 8\n14 8\n15 8\n", "output": "IndSet\n9 11 12 13 15 16 17 18\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\nBizon the Champion isn't just ch...
[{"type": "stdin_stdout", "input": "500000 500000 250000000000\n", "output": "250000000000\n"}, {"type": "stdin_stdout", "input": "499997 499989 248758432143\n", "output": "225563648440\n"}, {"type": "stdin_stdout", "input": "499997 499989 248758432143\n", "output": "225563648440"}, {"type": "stdin_stdout", "input": "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 string $s$, cons...
[{"type": "stdin_stdout", "input": "1\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\n", "output": "ba\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\nFrom tomorrow, the long-awaited ...
[{"type": "stdin_stdout", "input": "5\n8 100001\n14 100001\n12 100000\n11 100001\n3 100001", "output": "0\n"}, {"type": "stdin_stdout", "input": "5\n8 100001\n14 100001\n13 100000\n11 100001\n3 100001", "output": "0\n"}, {"type": "stdin_stdout", "input": "5\n8 000001\n14 100001\n13 100000\n11 100001\n3 100001", "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\nBob is a duck. He wants to get t...
[{"type": "stdin_stdout", "input": "10\n324839129156 133475576222 1946579156099 185514358673 88712073883 243757012712 950854402304 21947060440 598567289966 674328002732\nGLLLLLLLLW\n", "output": "26365097587258\n"}, {"type": "stdin_stdout", "input": "10\n324839129156 133475576222 987711341463 185514358673 88712073883 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\nRecently Polycarp started to dev...
[{"type": "stdin_stdout", "input": "92 51 18\n(()(((()())(()())())())(()())()()()())((()()())(())(())(()((())()())())(())())((())()())()()\nLRLRLLLLRRRLLRRLDLRLRRLRDLDLDLDDRRLRRRLLRDRLDDRLRRD\n", "output": "(()()()()())((()()())(())(())(()((())()())())(())())((())()())()()\n"}, {"type": "stdin_stdout", "input": "86 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 lot of people associate Logo p...
[{"type": "stdin_stdout", "input": "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF\n50\n", "output": "100\n"}, {"type": "stdin_stdout", "input": "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF\n40\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\nFox Ciel has some flowers: r red...
[{"type": "stdin_stdout", "input": "1000000000 1000000000 1000000000\n", "output": "1000000000\n"}, {"type": "stdin_stdout", "input": "1000000000 1000000000 1000000000\n", "output": "1000000000\n"}, {"type": "stdin_stdout", "input": "1000000000 1100000000 1000000000\n", "output": "1033333333\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\nLet A, B, C, D, E be sets of int...
[{"type": "stdin_stdout", "input": "A 3\n1 2 -1\nB 4\n4 0 0 11\nD 1\n5\nR 0\ncAiBdD\nC 3\n1 2 3\nA 4\n2 7 8 0\nB 3\n3 6 21\nR 0\n(As(AiB))uB", "output": "0 4 11\n0 2 3 6 7 8 21\n"}, {"type": "stdin_stdout", "input": "A 3\n2 3 -1\nB 4\n3 1 10 11\nD 1\n5\nR 0\ncAiBdD\nC 3\n1 2 3\nA 4\n2 10 8 3\nB 3\n2 4 7\nR 0\n(As(AiB))...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nValeric and Valerko missed the l...
[{"type": "stdin_stdout", "input": "1000 1 1000\n", "output": "999000\n"}, {"type": "stdin_stdout", "input": "1286 123 1043\n", "output": "9862\n"}, {"type": "stdin_stdout", "input": "1286 187 1043\n", "output": "6130\n"}, {"type": "stdin_stdout", "input": "1705 812 917\n", "output": "1009\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\nAs a token of his gratitude, Tak...
[{"type": "stdin_stdout", "input": "15043200 358979323846264338", "output": "35\n"}, {"type": "stdin_stdout", "input": "12899738 158337027091717102", "output": "34\n"}, {"type": "stdin_stdout", "input": "12899738 686618920047839292", "output": "36\n"}, {"type": "stdin_stdout", "input": "1565492 1138463356571161467", "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\nA monster is chasing after Rick ...
[{"type": "stdin_stdout", "input": "100 100\n100 100\n", "output": "100\n"}, {"type": "stdin_stdout", "input": "100 100\n100 100\n", "output": "100\n"}, {"type": "stdin_stdout", "input": "100 110\n100 100\n", "output": "-1\n"}, {"type": "stdin_stdout", "input": "87 22\n119 64\n", "output": "1849\n"}, {"type": "stdin_st...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIt all started with a black-and-...
[{"type": "stdin_stdout", "input": "6 4 7\n\n1010\n0001\n0001\n1000\n0111\n0101\n\n1010\n0001\n0001\n1000\n0111\n0101\n\n1010\n0001\n0001\n1000\n0111\n0101\n\n1010\n0001\n0001\n1000\n0111\n0101\n\n1010\n0001\n0001\n1000\n0111\n0101\n\n1010\n0001\n0001\n1000\n0111\n0101\n\n1010\n0001\n0001\n1000\n0111\n0101\n\n1010\n000...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nCreate a function that returns a...
[{"input": "4\n10", "output": "[[1, 5, 15, 35, 70, 126, 210, 330, 495, 715]]", "fn_name": "generate_diagonal"}, {"input": "100\n6", "output": "[[1, 101, 5151, 176851, 4598126, 96560646]]", "fn_name": "generate_diagonal"}, {"input": "3\n10", "output": "[[1, 4, 10, 20, 35, 56, 84, 120, 165, 220]]", "fn_name": "generate_d...
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\nPolycarp is wondering about buyi...
[{"type": "stdin_stdout", "input": "3\n4 15\n1 3 20 11\n1 2 13\n4 100\n2 5 10 50\n3 26 12\n2 1000000000\n1 1\n1\n", "output": "5\n14\n1000000000\n"}, {"type": "stdin_stdout", "input": "3\n4 15\n1 6 20 11\n1 2 13\n4 100\n2 7 10 50\n3 26 12\n2 1000000000\n1 1\n1\n", "output": "5\n12\n1000000000\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 is a binary string $a$ of ...
[{"type": "stdin_stdout", "input": "5\n10\n0111010000\n0100101100\n4\n0000\n0000\n3\n000\n000\n12\n010101010101\n100110011010\n6\n000111\n110100\n", "output": "YES\nYES\nYES\nYES\nNO\n"}, {"type": "stdin_stdout", "input": "5\n10\n0101011000\n1001101000\n4\n0000\n0000\n3\n010\n100\n12\n010101010101\n100110011010\n6\n000...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 receives t...
[{"input": "\"123456789!@#$%^&*( )qwerty\"\n\"9!@#$%^&*( )qwerty12345678\"", "output": "[18]", "fn_name": "shifted_diff"}, {"input": "\"doomhouse\"\n\"hoodmouse\"", "output": "[-1]", "fn_name": "shifted_diff"}, {"input": "\"fatigue\"\n\"tiguefa\"", "output": "[5]", "fn_name": "shifted_diff"}, {"input": "\"eecoff\"\n\"c...
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\nYou need to implement t...
[{"input": "false\nfalse", "output": "[false]", "fn_name": "func_or"}, {"input": "true\nfalse", "output": "[true]", "fn_name": "func_or"}, {"input": "true\ntrue", "output": "[true]", "fn_name": "func_or"}, {"input": "null\n[]", "output": "[false]", "fn_name": "func_or"}, {"input": "0\n11", "output": "[true]", "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\nIn the capital city of Berland, ...
[{"type": "stdin_stdout", "input": "100 10\n9199\n89 409 428 408 309 400 259 393 212 273 472 654 533 774 663 484 695 801 587 518 521 578 767 644 532 785 500 944 582 680 899 882 589 601 614 633 877 543 770 614 852 715 932 627 639 658 765 957 898 545 977 751 740 869 885 831 834 702 934 954 500 626 605 921 755 661 707 952...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA browser-based puzzle game call...
[{"type": "stdin_stdout", "input": "2 4 3 4\n2 1 2 4\n3 3 2 2\n0 3 3 3", "output": "-1\n"}, {"type": "stdin_stdout", "input": "2 4 3 4\n2 1 2 0\n3 3 2 2\n0 3 3 3", "output": "-1\n"}, {"type": "stdin_stdout", "input": "2 1 4 1\n2 2 4 2\n2 4 4 1\n0 4 4 1", "output": "-1\n"}, {"type": "stdin_stdout", "input": "2 4 3 3\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\nWrite\n\n```python\nfunction com...
[{"input": "[{\"a\": 2, \"b\": 1}, {\"a\": 1, \"b\": 2}]\n[1, 2, 3, 4]\n[5, 6]\n[7]", "output": "[[{\"a\": 2, \"b\": 1}, 1, 5, 7, {\"a\": 1, \"b\": 2}, 2, 6, 3, 4]]", "fn_name": "combine"}, {"input": "[\"a\", \"b\", \"c\"]\n[1, 2, 3, 4, 5]\n[6, 7]\n[8]", "output": "[[\"a\", 1, 6, 8, \"b\", 2, 7, \"c\", 3, 4, 5]]", "fn_...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn Fire City, there are n inters...
[{"type": "stdin_stdout", "input": "4 4\n1 2 0\n2 3 1\n3 1 2\n1 4 3\n3\n1 1 2\n1 2 1\n4 0 1\n", "output": "YES\nYES\nYES\n"}, {"type": "stdin_stdout", "input": "4 4\n1 2 1\n2 3 1\n3 1 2\n1 4 3\n3\n1 1 3\n1 2 4\n4 0 1\n", "output": "\nYES\nNO\nYES\n"}, {"type": "stdin_stdout", "input": "4 4\n1 2 1\n2 3 1\n3 1 2\n1 4 3\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 a mixed array of number an...
[{"input": "[\"3\", 6, 6, 0, \"5\", 8, 5, \"6\", 2, \"0\"]", "output": "[13]", "fn_name": "div_con"}, {"input": "[8, 0, 0, 8, 5, 7, 2, 3, 7, 8, 6, 7]", "output": "[61]", "fn_name": "div_con"}, {"input": "[\"5\", \"0\", 9, 3, 2, 1, \"9\", 6, 7]", "output": "[14]", "fn_name": "div_con"}, {"input": "[\"1\", \"5\", \"8\", ...
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 circular pond with a ...
[{"type": "stdin_stdout", "input": "20 3\n5 10 15\n", "output": "10\n"}, {"type": "stdin_stdout", "input": "37 3\n-1 0 91", "output": "-54\n"}, {"type": "stdin_stdout", "input": "10 3\n-2 9 50", "output": "-31\n"}, {"type": "stdin_stdout", "input": "10 3\n-2 5 50", "output": "-35\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\nYour math teacher gave you the f...
[{"type": "stdin_stdout", "input": "1\n10\n132182352 630066892\n906984407 923129673\n100213482 882571434\n191064823 398771294\n243750814 1483105037\n322757488 608184251\n241900265 682732740\n197067927 815099563\n17475338 866870249\n271628366 729808874\n", "output": "508213113\n"}, {"type": "stdin_stdout", "input": "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\nLet's denote a $k$-step ladder a...
[{"type": "stdin_stdout", "input": "4\n4\n1 12 1 3\n3\n1 3 1\n5\n2 1 3 1 2\n3\n1 1 2\n", "output": "2\n0\n1\n0\n"}, {"type": "stdin_stdout", "input": "4\n4\n1 12 1 3\n3\n1 3 1\n5\n2 1 3 4 2\n3\n1 1 2\n", "output": "2\n0\n2\n0\n"}, {"type": "stdin_stdout", "input": "4\n4\n1 3 1 3\n3\n3 3 2\n5\n2 3 3 4 2\n3\n1 1 2\n", "o...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nRead problems statements in Mand...
[{"type": "stdin_stdout", "input": "2\n109\n1", "output": "110\n1\n"}, {"type": "stdin_stdout", "input": "2\n185\n1", "output": "228\n1\n"}, {"type": "stdin_stdout", "input": "2\n15\n12", "output": "24\n28\n"}, {"type": "stdin_stdout", "input": "2\n208\n1", "output": "434\n1\n"}, {"type": "stdin_stdout", "input": "2\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\nYou have a fraction $\\frac{a}{b...
[{"type": "stdin_stdout", "input": "99999 100000 13\n", "output": "-1\n"}, {"type": "stdin_stdout", "input": "69168 84860 4\n", "output": "107\n"}, {"type": "stdin_stdout", "input": "25102 31579 2\n", "output": "174\n"}, {"type": "stdin_stdout", "input": "13805 15538 3\n", "output": "164\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\nOhana Matsumae is trying to clea...
[{"type": "stdin_stdout", "input": "20\n10101011101000011010\n11111010001100110101\n01011100010000001111\n10110100000101010011\n11010001110111101101\n00100110011011101010\n01000110101011001100\n01101100111101101101\n10111010010100111100\n00010010110001101110\n10111110010000101010\n10010111110100100100\n1101011100111111...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nChef recently saw the movie Matr...
[{"type": "stdin_stdout", "input": "3\n3 6\nabDefb\nbSooon\nNIKHil\n6 6\naaaaaa\nssssst\nxuisdP\noooooo\nioowoo\nbdylan\n6 5\njhfdb\ncacac\nopqrs\nddddd\nindia\nyucky", "output": "There is indeed no spoon!\nThere is indeed no spoon!\nThere is indeed no spoon!\n"}, {"type": "stdin_stdout", "input": "3\n3 6\nbfeDba\nbnpo...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThumbelina has had an accident. ...
[{"type": "stdin_stdout", "input": "200 72 29\n201 145 169 163 32 126 131 71 26 130 2 61 110 17 179 114 79 30 192 91 141 70 101 119 185 66 72 76 164 144 106 162 122 146 119 181 184 61 131 131 140 152 60 65 183 154 32 33 108 77 29 102 67 5 125 26 126 104 20 89 183 21 126 195 198 24 123 173 135 164 141 32\n160 65 136 22 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe year of 2012 is coming...\n\...
[{"type": "stdin_stdout", "input": "22\nCleo likes Snowy\nCleo likes Troll\nChapay likes Dracul\nSnowy likes Troll\nDracul likes Chapay\nDracul likes Snowy\nChapay likes Cleo\nSnowy likes Chapay\nDracul likes Troll\nAnka likes Hexadecimal\nSnowy likes Anka\nHexadecimal likes Cleo\nHexadecimal likes Troll\nDracul likes ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAndrewid the Android is a galaxy...
[{"type": "stdin_stdout", "input": "100 19\n6 62 72 83 91 94 97\n3 61 84 99\n1 63\n5 46 53 56 69 78\n5 41 43 49 74 89\n5 55 57 79 85 87\n3 47 59 98\n3 64 76 82\n3 48 66 75\n2 60 88\n2 67 77\n4 40 51 73 95\n41 1 2 3 4 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 44 71 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSunake is in the form of a polyg...
[{"type": "stdin_stdout", "input": "11\n63 106\n87 143\n102 132\n115 169\n74 145\n41 177\n56 130\n28 102\n19 124\n0 156\n22 183", "output": "Impossible\n"}, {"type": "stdin_stdout", "input": "11\n63 106\n87 143\n102 132\n115 169\n74 145\n41 177\n56 130\n28 102\n19 124\n0 294\n22 183", "output": "Impossible\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\nIt's been a while since I played...
[{"type": "stdin_stdout", "input": "AABBAAABABAABBBAABA\nAABBBABBABBAAABABABAAB\nBABAABAABABABBAAAB\nAABABAAABBAABBBABAA\nAAAAAAAAAAA\nABBBBBBBBBB\n0", "output": "11 8\n10 12\n11 7\n11 8\n11 0\n0 11\n"}, {"type": "stdin_stdout", "input": "ABAABBBAABABAAABBAA\nAABBBABBABBAAABABABAAB\nBABAABAABABABBAAAB\nAABABAAABBAABBBA...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nMike and Ann are sitting in the ...
[{"type": "stdin_stdout", "input": "wfyjbwcuxjrvmunfbrhethdmepeampvjcypavwoolteucetnqntytdfstvunnfyvngydjcohnwgtfddcnvuewxcafwureiupfeljqydwtickfbokoytlxtuwmvmvflemfvcksszlwgcwtamzovectkzxuzdtvbujyfpvcruvzvgglozwktwawcbkkwkookmuhjlcyjvfrnzmgpglvnbrujtbvtwrsqbulusfwzulxnadaqbijfrsvteqqoirfaolhfbgorxdwigwxcydbfxhvhqzjqir...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nChef has a nice complete binary ...
[{"type": "stdin_stdout", "input": "4\nlrl\nrll\nr\nlllr\n\n", "output": "10\n14\n4\n13\n"}, {"type": "stdin_stdout", "input": "4\nrll\nrll\nr\nlllr", "output": "14\n14\n4\n13\n"}, {"type": "stdin_stdout", "input": "4\nlrl\nrll\nr\nrlll", "output": "10\n14\n4\n27\n"}, {"type": "stdin_stdout", "input": "4\nlrl\nrll\nr\n...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given an undirected grap...
[{"type": "stdin_stdout", "input": "12 12\n5 1\n5 11\n1 11\n8 11\n8 9\n5 12\n6 9\n7 11\n9 3\n9 10\n4 12\n10 2\n78\n1 1\n1 2\n1 3\n1 4\n1 5\n1 6\n1 7\n1 8\n1 9\n2 10\n1 11\n1 12\n2 2\n2 3\n2 4\n2 5\n2 6\n2 7\n2 8\n3 9\n2 10\n2 11\n2 12\n3 3\n3 4\n3 5\n3 6\n4 7\n3 8\n3 9\n3 10\n3 11\n3 12\n4 4\n4 5\n4 6\n4 7\n4 8\n4 10\n...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAt many competitions that have a...
[{"type": "stdin_stdout", "input": "QDpiNBmCRFWxpdbfGOzvvOcemjructoAdEwegTvbVbfWWRPGyEAxGdDRWVlqNyGWMWHMrHAIZpyxvgaflrsVZhhZRouvpxrKXFZa\n", "output": "5 20\nQDpiNBmCRFWxpdbfGOzv\nvOcemjructoAdEwegTvb\nVbfWWRPGyEAxGdDRWVlq\nNyGWMWHMrHAIZpyxvgaf\nlrsVZhhZRouvpxrKXFZa\n"}, {"type": "stdin_stdout", "input": "QDpiNBmCRFWxp...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 Pero has been into robo...
[{"input": "\"P05P01P02P03P13P09P11P07K01P12K03K02K13K12K10K08H03H02H13H12H10H08T01T03T02T13T12T10T08P04K07H02T07H06T11K11T05K05H05H11\"", "output": "[[-1, -1, -1, -1]]", "fn_name": "cards_and_pero"}, {"input": "\"P01K02P03P11K09K10P13P10\"", "output": "[[8, 10, 13, 13]]", "fn_name": "cards_and_pero"}, {"input": "\"P01...
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\nAlexey, a merry Berland entrant,...
[{"type": "stdin_stdout", "input": "50\n69 6 6\n22 1 1\n23 3 3\n60 13 13\n13 3 3\n7 4 7\n6 1 1\n49 7 9\n68 8 8\n20 2 2\n34 1 1\n143 5 5\n22 1 1\n77 58 65\n10 3 3\n72 5 5\n47 1 1\n82 3 3\n92 8 8\n34 1 1\n42 9 10\n63 14 14\n10 3 3\n38 2 2\n80 6 6\n79 5 5\n53 5 5\n44 7 7\n85 2 2\n24 2 2\n57 3 3\n95 29 145\n77 6 6\n24 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\nproblem\n\nAOR Ika is studying t...
[{"type": "stdin_stdout", "input": "3\nnxx", "output": "2\n"}, {"type": "stdin_stdout", "input": "3\nnwx", "output": "3\n"}, {"type": "stdin_stdout", "input": "3\nxxo", "output": "1\n"}, {"type": "stdin_stdout", "input": "3\nxwn", "output": "3\n"}, {"type": "stdin_stdout", "input": "3\nowx", "output": "3\n"}, {"type": ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA bracket sequence is called reg...
[{"type": "stdin_stdout", "input": "))())))))))())))))()()))()()))))())))))()))))))))))))(()))())(()))))(()))))())))((((()()))))()))()))\n", "output": "48\n"}, {"type": "stdin_stdout", "input": ")))()))()))))()((((())))()))))(()))))(())()))(()))))))))))))())))))()))))()()))()())))))())))))))())\n", "output": "48\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\nFox Ciel is playing a card game ...
[{"type": "stdin_stdout", "input": "36 30\nATK 116\nATK 120\nATK 122\nATK 120\nATK 116\nATK 118\nATK 123\nDEF 2564\nATK 123\nDEF 1810\nATK 124\nATK 120\nDEF 2598\nATK 119\nDEF 2103\nATK 123\nATK 118\nATK 118\nATK 123\nDEF 1988\nATK 122\nATK 120\nDEF 2494\nATK 122\nATK 124\nATK 117\nATK 121\nATK 118\nATK 117\nATK 122\nA...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 have to write a ...
[{"input": "7", "output": "[\" 1 \\n 121 \\n 12321 \\n 1234321 \\n 123454321 \\n 12345654321 \\n1234567654321\\n 12345654321 \\n 123454321 \\n 1234321 \\n 12321 \\n 121 \\n 1 \"]", "fn_name": "pattern"}, {"input": "3", "output": "[\" 1 \\n 121 \\n12321\\n 12...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere is a frog staying to the l...
[{"type": "stdin_stdout", "input": "6\nLRLRRLL\nL\nLLR\nRRRR\nLLLLLL\nR\n", "output": "3\n2\n3\n1\n7\n1\n"}, {"type": "stdin_stdout", "input": "6\nRRLRLLL\nL\nLLR\nRRRR\nLLLLLL\nR\n", "output": "4\n2\n3\n1\n7\n1\n"}, {"type": "stdin_stdout", "input": "6\nMRLRRLL\nL\nLLR\nRRRR\nLLLLLL\nR\n", "output": "3\n2\n3\n1\n7\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\nToday in the scientific lyceum o...
[{"type": "stdin_stdout", "input": "50\nROWGGKNUITVHOBMKZXOZNBZMQGSFERNCZDFKLRBCFVVDXJEFLP\n", "output": "13\n"}, {"type": "stdin_stdout", "input": "50\nALWLSFLXYPQYMIWXMYMXFYMIVFYJDTJAIGVOAUDAIIAHKNNVTX\n", "output": "13\n"}, {"type": "stdin_stdout", "input": "50\nHKKUWHLYYKBLLEHKVNIRYAPVFTAPRIFUZELKGRDXZNCNWHSAFG\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 task is very simple. Just w...
[{"input": "\"codewars\"", "output": "[false]", "fn_name": "alphabetic"}, {"input": "\"asd\"", "output": "[false]", "fn_name": "alphabetic"}, {"input": "\"door\"", "output": "[true]", "fn_name": "alphabetic"}, {"input": "\"cell\"", "output": "[true]", "fn_name": "alphabetic"}, {"input": "\"z\"", "output": "[true]", "fn...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou wrote down all integers from...
[{"type": "stdin_stdout", "input": "2352\n", "output": "388795058 433322746 541969001 523323201 867893102 537695799 837561050 990678065 688882179 577079614 937069914 960273782 761665782 282484628 787581089 314410468 983373531 353249698 130693309 82500826 144964998 247781749 108001361 947489703 358119467 770902487 73956...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYaroslav thinks that two strings...
[{"type": "stdin_stdout", "input": "10\n?8?528?91?\n1???60??54\n", "output": "1000000000\n"}, {"type": "stdin_stdout", "input": "10\n?8?258?91?\n1???60??54\n", "output": "1000000000\n"}, {"type": "stdin_stdout", "input": "10\n0????19?01\n????164759\n", "output": "1000000000\n"}, {"type": "stdin_stdout", "input": "10\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\nYou are an immigration officer i...
[{"type": "stdin_stdout", "input": "100\n768 125 109 300 471 697 999 760 529 42 373 15 59 387 75 823 850 330 756 661 700 610 99 156 367 481 720 588 477 65 513 600 569 531 970 97 456 223 963 625 823 612 421 633 774 529 190 835 245 263 861 456 893 293 762 270 955 457 65 941 787 700 617 813 550 70 807 217 683 935 732 320 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nNearly each project of the F com...
[{"type": "stdin_stdout", "input": "100 5\n- 60\n- 58\n+ 25\n- 32\n+ 86\n", "output": "95\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 26 27 28 29 30 31 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 59 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 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 are given $n$ integers $a_1,...
[{"type": "stdin_stdout", "input": "1\n30\n1 2 3 4 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\n", "output": "30\n"}, {"type": "stdin_stdout", "input": "4\n3\n100 -100 100\n4\n100 0 0 0\n5\n0 0 0 0 0\n7\n100 3 -2 0 -100 4 5\n", "output": "2\n2\n1\n7\n"}, {"type": "stdin_stdout", "input": "3...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere is a 120 minute videotape ...
[{"type": "stdin_stdout", "input": "1 36 0\n-1 -1 -1", "output": "00:24:00\n01:12:00\n"}, {"type": "stdin_stdout", "input": "0 30 0\n-1 -1 -1", "output": "01:30:00\n04:30:00\n"}, {"type": "stdin_stdout", "input": "0 32 0\n-1 -1 -1", "output": "01:28:00\n04:24:00\n"}, {"type": "stdin_stdout", "input": "1 16 0\n-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 zombies are gathering in the...
[{"type": "stdin_stdout", "input": "10\n0000000000\n0000000000\n0000000000\n0000000000\n0000000000\n0000000000\n0012100000\n0024200000\n0012100000\n0000000000\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "10\n0000000000\n0122210000\n0244420100\n0122210000\n0000000000\n0000000000\n0000000000\n0000000000\n00...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 start of the new academic ye...
[{"type": "stdin_stdout", "input": "1000000000 1000000000 1000000000\n", "output": "1000000000000000000\n1000000000 1000000000\n"}, {"type": "stdin_stdout", "input": "1000000000 1000000000 1000000000\n", "output": "1000000000000000000\n1000000000 1000000000\n"}, {"type": "stdin_stdout", "input": "1000001000 1000000000 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nN programmers are going to parti...
[{"type": "stdin_stdout", "input": "3\n1 0\n0 10\n7 2", "output": "12\n"}, {"type": "stdin_stdout", "input": "3\n1 0\n0 17\n7 2", "output": "19\n"}, {"type": "stdin_stdout", "input": "3\n1 1\n0 17\n7 2", "output": "20\n"}, {"type": "stdin_stdout", "input": "3\n1 0\n0 27\n7 2", "output": "29\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 n points on the plane,...
[{"type": "stdin_stdout", "input": "35\n8 1\n6 8\n4 1\n1 2\n1 4\n5 10\n10 8\n9 1\n9 9\n10 2\n6 5\n8 8\n7 6\n10 6\n9 4\n4 9\n3 2\n1 8\n3 9\n7 3\n3 7\n2 7\n3 8\n3 1\n2 2\n5 5\n7 2\n4 10\n6 3\n5 1\n8 10\n4 3\n9 8\n9 7\n3 10\n", "output": "316"}, {"type": "stdin_stdout", "input": "35\n4 2\n9 6\n3 10\n2 5\n7 9\n6 9\n10 7\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\nThere are N towns in the State o...
[{"type": "stdin_stdout", "input": "4 6 3\n2 3 4\n1 2 4\n2 3 3\n4 3 1\n1 4 1\n4 2 2\n3 1 6\n", "output": "3\n"}, {"type": "stdin_stdout", "input": "4 6 3\n2 3 4\n1 2 4\n2 3 6\n4 3 1\n1 4 1\n4 2 2\n3 1 6", "output": "3\n"}, {"type": "stdin_stdout", "input": "4 6 3\n2 3 4\n1 2 4\n2 3 6\n4 3 1\n1 4 1\n4 1 2\n3 1 6", "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 given sequence of int...
[{"type": "stdin_stdout", "input": "30\n2 1 3 2 3 2 2 2 2 3 2 2 3 2 1 1 3 1 3 2 1 2 3 1 1 3 3 1 3 1\n", "output": "19\n"}, {"type": "stdin_stdout", "input": "30\n2 1 3 2 3 2 2 2 2 3 2 2 1 2 1 1 3 1 3 2 1 2 3 1 1 3 3 1 3 1\n", "output": "19\n"}, {"type": "stdin_stdout", "input": "30\n2 1 3 2 3 2 2 2 2 3 2 2 1 2 1 1 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 very easy task for you!\n\nYou...
[{"input": "\"03.12.2016\"", "output": "[\"03.12.2016\"]", "fn_name": "date_correct"}, {"input": "\"30.02.2016\"", "output": "[\"01.03.2016\"]", "fn_name": "date_correct"}, {"input": "\"40.06.2015\"", "output": "[\"10.07.2015\"]", "fn_name": "date_correct"}, {"input": "\"11.13.2014\"", "output": "[\"11.01.2015\"]", "fn...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nNowadays it is becoming increasi...
[{"type": "stdin_stdout", "input": "50 3 1\n30\n1 9\n2 1\n1 6\n1 5\n1 8\n1 1\n2 6\n1 7\n2 3\n2 8\n1 7\n2 4\n2 5\n2 11\n1 2\n2 15\n1 6\n1 3\n2 17\n1 9\n1 3\n2 18\n1 3\n2 23\n2 21\n1 8\n1 2\n2 27\n1 8\n2 29\n", "output": "0\n0\n9\n17\n28\n28\n0\n0\n0\n9\n15\n0\n6\n0\n11\n27\n"}, {"type": "stdin_stdout", "input": "50 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\nKarl is developing a key storage...
[{"type": "stdin_stdout", "input": "100\n1\n3\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n14\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n35\n36\n37\n38\n39\n40\n19\n42\n43\n44\n45\n46\n47\n20\n49\n50\n65\n52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71\n72\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\nAndrey needs one more problem to...
[{"type": "stdin_stdout", "input": "100\n0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.8612181095398133 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nKolya is going to make fresh ora...
[{"type": "stdin_stdout", "input": "100 1000 1083\n992 616 818 359 609 783 263 989 501 929 362 394 919 1081 870 830 1097 975 62 346 531 367 323 457 707 360 949 334 867 116 478 417 961 963 1029 114 867 1008 988 916 983 1077 959 1322 572 961 579 318 721 337 488 717 111 70 416 685 987 130 353 107 61 191 827 849 106 815 21...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nVasya studies divisibility rules...
[{"type": "stdin_stdout", "input": "30 100\n", "output": "2-type\n2\n"}, {"type": "stdin_stdout", "input": "10 100\n", "output": "2-type\n2\n"}, {"type": "stdin_stdout", "input": "10 25\n", "output": "2-type\n2\n"}, {"type": "stdin_stdout", "input": "70 14\n", "output": "2-type\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\nYou are standing on the $\\mathi...
[{"type": "stdin_stdout", "input": "12\n1\n2\n3\n4\n5\n1\n2\n3\n4\n5\n1\n2\n", "output": "1\n3\n2\n3\n4\n1\n3\n2\n3\n4\n1\n3\n"}, {"type": "stdin_stdout", "input": "12\n1\n2\n3\n4\n5\n1\n2\n3\n4\n5\n1\n2\n", "output": "1\n3\n2\n3\n4\n1\n3\n2\n3\n4\n1\n3\n"}, {"type": "stdin_stdout", "input": "12\n1\n2\n3\n4\n5\n2\n2\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 me a function `stringy` th...
[{"input": "28", "output": "[\"1010101010101010101010101010\"]", "fn_name": "stringy"}, {"input": "26", "output": "[\"10101010101010101010101010\"]", "fn_name": "stringy"}, {"input": "12", "output": "[\"101010101010\"]", "fn_name": "stringy"}, {"input": "5", "output": "[\"10101\"]", "fn_name": "stringy"}, {"input": "3"...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nTwo famous competing companies C...
[{"type": "stdin_stdout", "input": "10\n598654597 975579682\n117777072 31932499\n223851456 1477480177\n988262691 654502493\n967529230 543358150\n835120075 101574205\n809901567 613170206\n152157661 479980560\n859252956 158469817\n614959273 735298093\n10\n1156316033 361325206\n341655282 740807372\n239996693 809030434\n81...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn this problem, a $n \\times m$...
[{"type": "stdin_stdout", "input": "10 4\n4 9 11 12\n8 11 13 18\n13 16 18 21\n15 21 0 24\n17 0 21 29\n21 26 0 33\n26 31 33 35\n30 32 35 37\n33 37 40 43\n34 41 46 51\n", "output": "-1\n"}, {"type": "stdin_stdout", "input": "10 4\n4 9 11 12\n8 11 13 18\n13 16 18 21\n15 21 0 24\n17 0 21 29\n21 26 0 33\n26 31 33 35\n30 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\nIahub is a big fan of tourists. ...
[{"type": "stdin_stdout", "input": "50\n3987477 8934938 4067156 6712855 7269334 5039822 9533601 9335400 5992073 2619268 438734 8620973 4347619 4307947 2249161 815221 7615258 8244100 8341666 5908546 6646952 4812769 6215114 7479369 6290438 5623785 6466133 9953199 3525873 4326034 3510072 8117068 2342953 1717542 9766539 65...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nPupils decided to go to amusemen...
[{"type": "stdin_stdout", "input": "100 1000 1000\n0000010100101100110100101111001111111111100101111100111011110001011110110111111010000000101000111000\n", "output": "100000\n"}, {"type": "stdin_stdout", "input": "100 1000 1000\n0000010100101100110100101111001111111111100101111100111011110001011110110111111010000000101...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nCreate a function\n\n```python\n...
[{"input": "46163", "output": "[false]", "fn_name": "has_two_cube_sums"}, {"input": "4103", "output": "[false]", "fn_name": "has_two_cube_sums"}, {"input": "4102", "output": "[false]", "fn_name": "has_two_cube_sums"}, {"input": "4105", "output": "[false]", "fn_name": "has_two_cube_sums"}, {"input": "4106", "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 have an array of numbers. \...
[{"input": "[1, 2, 3, 4, 5, 6, 7, 8, 9, 0]", "output": "[[1, 2, 3, 4, 5, 6, 7, 8, 9, 0]]", "fn_name": "sort_array"}, {"input": "[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]", "output": "[[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]]", "fn_name": "sort_array"}, {"input": "[0, 1, 2, 3, 4, 9, 8, 7, 6, 5]", "output": "[[0, 1, 2, 3, 4, 5, 8, 7, 6, 9]]...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYour task is simply to count the...
[{"input": "\"abcABC123!@#$%^&*()_-+=}{[]|':;?/>.<,~\"", "output": "[3]", "fn_name": "lowercase_count"}, {"input": "\"ABC123!@#$%^&*()_-+=}{[]|':;?/>.<,~\"", "output": "[0]", "fn_name": "lowercase_count"}, {"input": "\"abcdefghijklmnopqrstuvwxyz\"", "output": "[26]", "fn_name": "lowercase_count"}, {"input": "\"abcABC12...
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 integers a and...
[{"type": "stdin_stdout", "input": "-3 -5", "output": "*\n"}, {"type": "stdin_stdout", "input": "11 -1", "output": "x\n"}, {"type": "stdin_stdout", "input": "15 -1", "output": "x\n"}, {"type": "stdin_stdout", "input": "29 -1", "output": "x\n"}, {"type": "stdin_stdout", "input": "13 -1", "output": "x\n"}, {"type": "stdi...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThree people, A, B and C, are tr...
[{"type": "stdin_stdout", "input": "-1 000 -1 15", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "-1 100 -1 15", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "-1 100 -1 12", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "-1 100 -1 13", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "-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\nPetya is the most responsible wo...
[{"type": "stdin_stdout", "input": "20\n100 200 100 1 100 100\n100 200 1 100 100 100\n2 2 1 1 2 2\n100 100 50 50 1 1\n10 10 5 5 1 1\n100 100 99 1 1 99\n100 100 1 99 99 1\n100 100 1 10 10 1\n100 100 1 1 10 10\n9 6 1 3 3 1\n1000000000 1000000000 1 1 1000000000 1000000000\n9 4 1 4 4 1\n6 4 1 1 5 4\n6 2 1 1 5 2\n8 2 1 1 5 ...
code_stdio