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\nCaisa is going to have a party a... | [{"type": "stdin_stdout", "input": "69 9\n39 15\n70 44\n90 89\n84 58\n83 97\n24 28\n90 18\n7 96\n43 86\n99 50\n77 12\n12 34\n100 19\n21 86\n55 30\n99 29\n26 92\n82 67\n78 14\n64 16\n98 12\n31 39\n36 86\n73 36\n87 29\n42 23\n58 15\n35 52\n91 56\n39 6\n88 45\n38 36\n57 12\n79 71\n40 33\n98 42\n34 36\n23 79\n69 68\n50 47\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLunar New Year is approaching, a... | [{"type": "stdin_stdout", "input": "10 15\n132 138 38 75 14 115 129 68 119 118\n728344 513371 120930 757031 137753 453796 348671 185533 966778 521678\n4 58\n1 8\n8 22\n3 98\n2 111\n6 158\n2 82\n1 170\n1 26\n1 4\n4 76\n10 106\n5 100\n4 116\n7 62\n", "output": "43907798\n5826752\n4081726\n15058400\n56984181\n67179393\n33... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nMy washing machine uses ```water... | [{"input": "10\n10\n2", "output": "[\"Not enough clothes\"]", "fn_name": "how_much_water"}, {"input": "10\n10\n21", "output": "[\"Too much clothes\"]", "fn_name": "how_much_water"}, {"input": "50\n15\n29", "output": "[189.87]", "fn_name": "how_much_water"}, {"input": "10\n11\n20", "output": "[23.58]", "fn_name": "how_m... | 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\nMedicine faculty of Berland Stat... | [{"type": "stdin_stdout", "input": "10\n5620 2478 4051 7060 10510 2170 6912 2031 1781 7454\n1 1 1 1 1 1 1 1 1 1\n", "output": "5620\n"}, {"type": "stdin_stdout", "input": "10\n5620 1555 4051 7060 10510 2170 6912 2031 1781 7454\n1 1 1 1 1 1 1 1 1 1\n", "output": "5620\n"}, {"type": "stdin_stdout", "input": "10\n7846 835... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nCount how often sign changes in ... | [{"input": "[1, -2, -7, -4, 4, -2, 0, -3, 3]", "output": "[6]", "fn_name": "catch_sign_change"}, {"input": "[-2, -2, -5, -4, 5, 2, 0, 6, 0]", "output": "[1]", "fn_name": "catch_sign_change"}, {"input": "[-8, 4, -1, 5, -3, -3, -2, -2]", "output": "[4]", "fn_name": "catch_sign_change"}, {"input": "[13, -7, -6, 2, -1, 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\n- Kids drink toddy.\n- Teens dri... | [{"input": "22", "output": "[\"drink whisky\"]", "fn_name": "people_with_age_drink"}, {"input": "21", "output": "[\"drink whisky\"]", "fn_name": "people_with_age_drink"}, {"input": "13", "output": "[\"drink toddy\"]", "fn_name": "people_with_age_drink"}, {"input": "0", "output": "[\"drink toddy\"]", "fn_name": "people_... | 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\nDee is lazy but she's kind and s... | [{"input": "125\n1", "output": "[14]", "fn_name": "calc_tip"}, {"input": "125\n0", "output": "[12]", "fn_name": "calc_tip"}, {"input": "125\n-1", "output": "[5]", "fn_name": "calc_tip"}, {"input": "144\n1", "output": "[15]", "fn_name": "calc_tip"}, {"input": "144\n0", "output": "[13]", "fn_name": "calc_tip"}, {"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\nFor a sequence of integers $A = ... | [{"type": "stdin_stdout", "input": "4\n-2 -1 1 2", "output": "-2 -1 1 2\n"}, {"type": "stdin_stdout", "input": "4\n-2 -1 0 2", "output": "-2 -1 0 2\n"}, {"type": "stdin_stdout", "input": "4\n-2 -1 0 4", "output": "-2 -1 0 4\n"}, {"type": "stdin_stdout", "input": "4\n-1 0 1 10", "output": "-1 0 1 10\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 vowel substrings in the word... | [{"input": "\"ultrarevolutionariees\"", "output": "[3]", "fn_name": "solve"}, {"input": "\"chrononhotonthuooaos\"", "output": "[5]", "fn_name": "solve"}, {"input": "\"iiihoovaeaaaoougjyaw\"", "output": "[8]", "fn_name": "solve"}, {"input": "\"strengthlessnesses\"", "output": "[1]", "fn_name": "solve"}, {"input": "\"cub... | 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\nAndrew often reads articles in h... | [{"type": "stdin_stdout", "input": "31\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "31\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\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\nPolygons are the most fundamenta... | [{"type": "stdin_stdout", "input": "3\n1 1\n3 4\n6 -1\n\n7\n1 -1\n10 10\n-1 20\n3 33\n0 70\n100 40\n100 -1\n\n0", "output": "1 9.5\n2 5426.0\n"}, {"type": "stdin_stdout", "input": "3\n1 1\n3 4\n6 -1\n\n7\n1 -1\n10 10\n-1 20\n3 33\n0 40\n100 40\n100 0\n\n0", "output": "1 9.5\n2 3921.5\n"}, {"type": "stdin_stdout", "inpu... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nFarmer Bob have a big farm, wher... | [{"input": "152\n38\n34", "output": "[{\"rabbits\": 21, \"chickens\": 0, \"cows\": 17}]", "fn_name": "get_animals_count"}, {"input": "154\n42\n10", "output": "[{\"rabbits\": 30, \"chickens\": 7, \"cows\": 5}]", "fn_name": "get_animals_count"}, {"input": "74\n20\n34", "output": "[{\"rabbits\": 0, \"chickens\": 3, \"cows... | 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\nSo many wall designs to choose f... | [{"type": "stdin_stdout", "input": "100000000 100 100\n", "output": "807624\n"}, {"type": "stdin_stdout", "input": "100000100 100 100\n", "output": "515397\n"}, {"type": "stdin_stdout", "input": "100000000 100 1\n", "output": "245069\n"}, {"type": "stdin_stdout", "input": "100000000 1 100\n", "output": "389182\n"}, {"t... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nPolycarp and Vasiliy love simple... | [{"type": "stdin_stdout", "input": "100000 99999 100000 100000\n", "output": "Polycarp\n"}, {"type": "stdin_stdout", "input": "100000 100000 100000 99999\n", "output": "Vasiliy\n"}, {"type": "stdin_stdout", "input": "55000 60000 55003 60100\n", "output": "Polycarp\n"}, {"type": "stdin_stdout", "input": "23039 21508 541... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nTakahashi is distributing N ball... | [{"type": "stdin_stdout", "input": "-2 135", "output": "-137\n"}, {"type": "stdin_stdout", "input": "-2 240", "output": "-242\n"}, {"type": "stdin_stdout", "input": "-4 240", "output": "-244\n"}, {"type": "stdin_stdout", "input": "3 130", "output": "-127\n"}, {"type": "stdin_stdout", "input": "2 130", "output": "-128\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\nThere is a bus route as shown in... | [{"type": "stdin_stdout", "input": "2\n1 8\n8 0", "output": "1 2 3 4 5 6 7 8\n8 9 5 4 3 2 1 0\n"}, {"type": "stdin_stdout", "input": "2\n1 9\n8 1", "output": "1 2 3 4 5 6 7 8 9\n8 9 5 4 3 2 1\n"}, {"type": "stdin_stdout", "input": "2\n2 8\n6 2", "output": "2 3 4 5 6 7 8\n6 7 8 9 5 4 3 2\n"}, {"type": "stdin_stdout", "i... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn Dark Souls, players level up ... | [{"input": "\"pyromancer\"\n[16, 12, 11, 12, 9, 12, 13, 10]", "output": "[\"Starting as a pyromancer, level 12 will require 8348 souls.\"]", "fn_name": "souls"}, {"input": "\"pyromancer\"\n[16, 12, 11, 12, 9, 12, 13, 8]", "output": "[\"Starting as a pyromancer, level 10 will require 6672 souls.\"]", "fn_name": "souls"}... | 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 number m of the form 10x + y i... | [{"input": "2340029794923400297949", "output": "[[14, 20]]", "fn_name": "seven"}, {"input": "170232833617690725", "output": "[[0, 16]]", "fn_name": "seven"}, {"input": "477557101", "output": "[[28, 7]]", "fn_name": "seven"}, {"input": "477557102", "output": "[[47, 7]]", "fn_name": "seven"}, {"input": "1369851", "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\nLimak is a grizzly bear who desi... | [{"type": "stdin_stdout", "input": "100\n1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nproblem\n\nJOI took six subjects... | [{"type": "stdin_stdout", "input": "100\n-3\n8\n108\n-12\n-4", "output": "212\n"}, {"type": "stdin_stdout", "input": "100\n-7\n8\n108\n-12\n-1", "output": "215\n"}, {"type": "stdin_stdout", "input": "100\n66\n-13\n-1\n-2\n2", "output": "167\n"}, {"type": "stdin_stdout", "input": "100\n106\n-5\n-1\n-2\n3", "output": "20... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLast year the world's largest sq... | [{"type": "stdin_stdout", "input": "100000 -100000 100000 100000\n", "output": " 200001\n"}, {"type": "stdin_stdout", "input": "100000 100000 100000 -100000\n", "output": " 200001\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\nDima and Inna are doing so great... | [{"type": "stdin_stdout", "input": "1000000 1000000 1000000 0000000 1000000 1000000\n", "output": "Poor Inna and pony!"}, {"type": "stdin_stdout", "input": "1000100 1000000 1000000 0000000 1000000 1000000\n", "output": "Poor Inna and pony!"}, {"type": "stdin_stdout", "input": "1000100 1000010 1000000 0000000 1000000 10... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn the game Lizard Era: Beginnin... | [{"type": "stdin_stdout", "input": "25\n26668 10412 12658\n25216 11939 10247\n28514 22515 5833\n4955 19029 22405\n12552 6903 19634\n12315 1671 505\n20848 9175 6060\n12990 5827 16433\n9184 30621 25596\n31818 7826 11221\n18090 4476 30078\n30915 11014 16950\n3119 29529 21390\n775 4290 11723\n29679 14840 3566\n4491 29480 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\nExample\n\nInput\n\nacmicpc\ntsu... | [{"type": "stdin_stdout", "input": "acmicpc\nttukuba", "output": "No\n"}, {"type": "stdin_stdout", "input": "acmpcic\nttukuba", "output": "No\n"}, {"type": "stdin_stdout", "input": "acmpcid\nttukuba", "output": "No\n"}, {"type": "stdin_stdout", "input": "acmpcid\nttakubu", "output": "No\n"}, {"type": "stdin_stdout", "i... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nGiven a non-negative number, ret... | [{"input": "3608528850368400786036724", "output": "[3608528850368400786036725]", "fn_name": "next_num"}, {"input": "3608528850368400786036725", "output": "[null]", "fn_name": "next_num"}, {"input": "1234567890", "output": "[1236004020]", "fn_name": "next_num"}, {"input": "123220", "output": "[123252]", "fn_name": "next... | 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 the sum of the integers bet... | [{"type": "stdin_stdout", "input": "100 4 16\n", "output": "4554\n"}, {"type": "stdin_stdout", "input": "101 0 154", "output": "5151\n"}, {"type": "stdin_stdout", "input": "111 1 181", "output": "6216\n"}, {"type": "stdin_stdout", "input": "110 2 100", "output": "5994\n"}, {"type": "stdin_stdout", "input": "100 2 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\nSlava plays his favorite game \"... | [{"type": "stdin_stdout", "input": "11124\n", "output": "16686\n2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 60 62 64 66 68 70 72 74 76 78 80 82 84 86 88 90 92 94 96 98 100 102 104 106 108 110 112 114 116 118 120 122 124 126 128 130 132 134 136 138 140 142 144 146 148 150 152 154 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\nWe have a graph with N vertices,... | [{"type": "stdin_stdout", "input": "2 1\n0 0 1000000010", "output": "1000000011\n"}, {"type": "stdin_stdout", "input": "2 1\n1 0 1000000010", "output": "1000000010\n"}, {"type": "stdin_stdout", "input": "2 1\n0 0 1000000100", "output": "1000000101\n"}, {"type": "stdin_stdout", "input": "2 1\n0 0 1000001010", "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\nOne tradition of ACM-ICPC contes... | [{"type": "stdin_stdout", "input": "7\n14000000003 1000000000000000000\n81000000000 88000000000\n5000000000 10778591928\n15000000000 39000000000\n46000000000 51000000000\n0 0000000000\n0 0\n", "output": "3\n"}, {"type": "stdin_stdout", "input": "7\n14000000003 1000000000000000000\n81000000000 88000000000\n5000000000 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\nPeter loves any kinds of cheatin... | [{"type": "stdin_stdout", "input": "3\n10 20 47\n7\n56 26 62 143 38 80 7", "output": "117\n1108\n"}, {"type": "stdin_stdout", "input": "3\n10 20 47\n7\n56 44 62 143 38 80 7", "output": "117\n1210\n"}, {"type": "stdin_stdout", "input": "3\n10 20 47\n7\n56 44 62 143 38 80 6", "output": "117\n1203\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\nPalindromic characteristics of s... | [{"type": "stdin_stdout", "input": "wyemcafatp\n", "output": "11 1 0 0 0 0 0 0 0 0 \n"}, {"type": "stdin_stdout", "input": "wyemcafatp\n", "output": "11 1 0 0 0 0 0 0 0 0 "}, {"type": "stdin_stdout", "input": "wyempafatc\n", "output": "11 1 0 0 0 0 0 0 0 0\n"}, {"type": "stdin_stdout", "input": "wyempaf`tc\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\nOf course our child likes walkin... | [{"type": "stdin_stdout", "input": "10 19\n13637 26970 19043 3616 12880 19387 12539 25190 2452 1261\n1 2\n1 3\n1 4\n2 5\n3 6\n6 7\n3 8\n5 9\n3 10\n4 10\n9 3\n2 8\n4 3\n2 3\n7 10\n7 8\n5 10\n5 6\n7 4\n", "output": "8241.4222222222\n"}, {"type": "stdin_stdout", "input": "10 19\n15704 19758 26631 25050 22778 15041 8487 26... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nMonocarp plays a computer game. ... | [{"type": "stdin_stdout", "input": "2 10\n20\n2 2\n2 3\n2 4\n1 5\n1 2\n1 6\n1 1\n1 10\n2 10\n1 4\n2 8\n2 1\n1 9\n1 8\n2 5\n1 7\n2 7\n1 3\n2 9\n2 6\n", "output": "4\n"}, {"type": "stdin_stdout", "input": "2 10\n20\n2 6\n2 3\n1 1\n2 1\n2 9\n1 6\n1 2\n1 9\n1 10\n2 7\n2 4\n2 5\n1 5\n2 2\n2 8\n1 3\n1 8\n1 4\n1 7\n2 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\nCreate a function `longer` that ... | [{"input": "\"Darkness on the edge of Town\"", "output": "[\"of on the Town edge Darkness\"]", "fn_name": "longer"}, {"input": "\"Have you ever Seen the Rain\"", "output": "[\"the you Have Rain Seen ever\"]", "fn_name": "longer"}, {"input": "\"This will be our Year\"", "output": "[\"be our This Year will\"]", "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\nWe have an integer array with un... | [{"input": "20\n2", "output": "[447507315596451070]", "fn_name": "fixed_points_perms"}, {"input": "10\n3", "output": "[222480]", "fn_name": "fixed_points_perms"}, {"input": "10\n4", "output": "[55650]", "fn_name": "fixed_points_perms"}, {"input": "4\n1", "output": "[8]", "fn_name": "fixed_points_perms"}, {"input": "4\n... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given a rectangular tabl... | [{"type": "stdin_stdout", "input": "10\n1086100980 -928074266 -409520915 770775361 240764400 108297300 -280070452 588179696 -920283246 736937716\n422602209 -940948979 -483879926 -525886137 -79749893 -958247281 844561102 553768085 269384580 -975129348\n-485518332 -130037110 493465239 494308146 958976404 706037260 154106... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 snake exhibition, there a... | [{"type": "stdin_stdout", "input": "36\n2\n--\n2\n>-\n2\n<-\n2\n->\n2\n>>\n2\n<>\n2\n-<\n2\n><\n2\n<<\n3\n---\n3\n>--\n3\n<--\n3\n->-\n3\n>>-\n3\n<>-\n3\n-<-\n3\n><-\n3\n<<-\n3\n-->\n3\n>->\n3\n<->\n3\n->>\n3\n>>>\n3\n<>>\n3\n-<>\n3\n><>\n3\n<<>\n3\n--<\n3\n>-<\n3\n<-<\n3\n-><\n3\n>><\n3\n<><\n3\n-<<\n3\n><<\n3\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\nWrite a function that reverses t... | [{"input": "2017", "output": "[1087]", "fn_name": "reverse_bits"}, {"input": "1023", "output": "[1023]", "fn_name": "reverse_bits"}, {"input": "417", "output": "[267]", "fn_name": "reverse_bits"}, {"input": "267", "output": "[417]", "fn_name": "reverse_bits"}, {"input": "1024", "output": "[1]", "fn_name": "reverse_bits... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn this kata you need to write a... | [{"input": "\"10\"\n\"10\"\n\"multiply\"", "output": "[\"100\"]", "fn_name": "calculate"}, {"input": "\"100\"\n\"10\"\n\"subtract\"", "output": "[\"10\"]", "fn_name": "calculate"}, {"input": "\"1\"\n\"1\"\n\"subtract\"", "output": "[\"0\"]", "fn_name": "calculate"}, {"input": "\"1\"\n\"1\"\n\"multiply\"", "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\nRecently Polycarp noticed that s... | [{"type": "stdin_stdout", "input": "1\nammsdsdadasdsadssadassadsadasdsadsadr\n", "output": "adrs\n"}, {"type": "stdin_stdout", "input": "1\nammsdsdadasdsadssadassadsadasdsadsadr\n", "output": "adrs\n"}, {"type": "stdin_stdout", "input": "1\nammsdsdaeasdsadssadassadsadasdsadsads\n", "output": "ades\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\nArkady is playing Battleship. Th... | [{"type": "stdin_stdout", "input": "19 6\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\nLittle Chris knows there's no fu... | [{"type": "stdin_stdout", "input": "400\n.L.R.LR.LRL.R.LR.LR..L....RLR.L..R..LRLRLR.LRL..RLR.LRLRLRLR.LR..LRL.RLR...LRLR.LRL.R.LR..LR.LRLR...LRLRL.R.L.....RL..RL.RLRL.RL.RL...RL..R.LRLRL..R.LRL...R..LRL.RLRL...RL..RLRLRLRL.R..LRL.R..LRLRL.R.L.R.L.RL.RLRLRL....R.LR..L..RL.RL.RLRLR.L..RLRL.RLR..LRLR.L.R..L.R.LR.LRL.....R... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere is always an integer in Ta... | [{"type": "stdin_stdout", "input": "-+--\n", "output": "-2\n"}, {"type": "stdin_stdout", "input": "----\n", "output": "-4\n"}, {"type": "stdin_stdout", "input": "--+-\n", "output": "-2\n"}, {"type": "stdin_stdout", "input": "+---\n", "output": "-2\n"}, {"type": "stdin_stdout", "input": "+-++\n", "output": "2\n"}, {"typ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\n# Description\n\nGiven a number ... | [{"input": "9007199254740991", "output": "[[1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, 16777216, 33554432, 67108864, 134217728, 268435456, 536870912, 1073741824, 2147483648, 4294967296, 8589934592, 17179869184, 34359738... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nRead problems statements in Mand... | [{"type": "stdin_stdout", "input": "5\n-2 -8\n11 0\n109 35\n0 -2\n-4 0", "output": "0\n0\n4375\n0\n0\n"}, {"type": "stdin_stdout", "input": "5\n-3 0\n11 1\n148 35\n0 -2\n-4 0", "output": "0\n0\n18334\n0\n0\n"}, {"type": "stdin_stdout", "input": "5\n-3 0\n5 1\n148 35\n0 -2\n-4 0", "output": "0\n1\n18334\n0\n0\n"}, {"typ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nTake debugging to a whole new le... | [{"input": "\"oaisjdfowjefpoibugsjsofijeo oi bugs o bug f bug poaj sfd s\"", "output": "[\"oaisjdfowjefpoibugsjsofijeo oi bugs o f poaj sfd s\"]", "fn_name": "debug"}, {"input": "\"oaiwjefbugoijoijapsbugsdoibugbugjfoijasdfbugsbug\"", "output": "[\"oaiwjefoijoijapsbugsdoijfoijasdfbugs\"]", "fn_name": "debug"}, {"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\nPavel made a photo of his favour... | [{"type": "stdin_stdout", "input": "2\n240945287 28477772 1496174734 106174079\n", "output": "97526692469552229\n"}, {"type": "stdin_stdout", "input": "2\n240945287 28477772 1496174734 174902664\n", "output": "96930557139611326\n"}, {"type": "stdin_stdout", "input": "2\n240945287 45763153 1496174734 174902664\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\nKevin Sun has just finished comp... | [{"type": "stdin_stdout", "input": "119 119 119 119 119\n10 10 10 10 10\n0 20\n", "output": "1310\n"}, {"type": "stdin_stdout", "input": "119 119 119 119 119\n10 10 10 10 10\n0 20\n", "output": "1310\n"}, {"type": "stdin_stdout", "input": "78 119 119 119 119\n10 10 10 10 10\n0 20\n", "output": "1310\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\nFor given integer n, count the t... | [{"type": "stdin_stdout", "input": "1101011", "output": "1084512\n"}, {"type": "stdin_stdout", "input": "1100111", "output": "1097712\n"}, {"type": "stdin_stdout", "input": "1010111", "output": "1003752\n"}, {"type": "stdin_stdout", "input": "1111111", "output": "1106224\n"}, {"type": "stdin_stdout", "input": "1011001"... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 array:\n\... | [{"input": "1000000000000000000", "output": "[1]", "fn_name": "solve"}, {"input": "999999999999999999", "output": "[4]", "fn_name": "solve"}, {"input": "999999999999999993", "output": "[7]", "fn_name": "solve"}, {"input": "123456789", "output": "[3]", "fn_name": "solve"}, {"input": "123456", "output": "[6]", "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\nYour wizard cousin works at a Qu... | [{"input": "\"Caerphilly Catapults vs Wigtown Wanderers\"\n\"Caerphilly Catapults: Quaffle goal, Caerphilly Catapults: Quaffle goal, Caerphilly Catapults: Quaffle goal, Caerphilly Catapults: Quaffle goal, Caerphilly Catapults: Quaffle goal, Caerphilly Catapults: Quaffle goal, Wigtown Wanderers: Quaffle goal, Caerphilly... | 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\n3R2 as DJ Mashiro - Happiness Br... | [{"type": "stdin_stdout", "input": "10 83\n1 3\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n1 4\n2 2\n2 3\n2 3\n2 3\n2 3\n2 3\n2 3\n1 4\n1 5\n1 7\n2 2\n2 2\n1 5\n2 2\n1 3\n2 1\n2 6\n1 5\n2 6\n2 9\n1 2\n2 5\n1 2\n2 5\n2 4\n2 4\n1 2\n1 2\n1 4\n2 6\n2 6\n2 4\n2 4\n1 2\n1 2\n2 4\n2 4\n2 3\n2 3\n1 2\n2 9\n1 2\n1 2\n1 2\n2 6\n2 6\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\nThere is a legend in the IT City... | [{"type": "stdin_stdout", "input": "1250846005844530517\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "1000001000000000000\n", "output": "2\n"}, {"type": "stdin_stdout", "input": "2039244416399039339\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "1000001000000001000\n", "output": "2\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\nImplement a function which behav... | [{"input": "[\"a\", \"a\", \"b\", \"b\", \"c\", \"a\", \"b\", \"c\", \"c\"]", "output": "[[\"a\", \"b\", \"c\", \"a\", \"b\", \"c\"]]", "fn_name": "uniq"}, {"input": "[\"a\", \"a\", \"a\", \"b\", \"b\", \"b\", \"c\", \"c\", \"c\"]", "output": "[[\"a\", \"b\", \"c\"]]", "fn_name": "uniq"}, {"input": "[null, \"a\", \"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\nWet Shark once had 2 sequences: ... | [{"type": "stdin_stdout", "input": "-15 -1 -2\n2 0", "output": "2147483648.00000000000\n"}, {"type": "stdin_stdout", "input": "-15 -1 -1\n2 0", "output": "1073741824.00000000000\n"}, {"type": "stdin_stdout", "input": "-6 4 -1\n8 -1", "output": "14680064.00000000000\n"}, {"type": "stdin_stdout", "input": "-8 0 -1\n2 -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\nWhen preparing a tournament, Cod... | [{"type": "stdin_stdout", "input": "100\n0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n", "output": "EASY\n"}, {"type": "stdin_stdout", "input": "100\n0 0 0 0 0 0 0 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\n## Task:\n\nYour task is to writ... | [{"input": "15", "output": "[\"1.94\"]", "fn_name": "series_sum"}, {"input": "39", "output": "[\"2.26\"]", "fn_name": "series_sum"}, {"input": "58", "output": "[\"2.40\"]", "fn_name": "series_sum"}, {"input": "1", "output": "[\"1.00\"]", "fn_name": "series_sum"}, {"input": "2", "output": "[\"1.25\"]", "fn_name": "serie... | 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\nCountry of Metropolia is holding... | [{"type": "stdin_stdout", "input": "10 10 1\n351 0 3 7\n214 0 9 9\n606 0 7 8\n688 0 9 3\n188 3 0 9\n994 0 1 7\n372 5 0 14\n957 0 3 6\n458 8 0 7\n379 0 4 7\n", "output": "-1\n"}, {"type": "stdin_stdout", "input": "4 10 1\n988 0 1 1\n507 1 0 9\n798 1 0 9\n400 0 3 7\n242 2 0 8\n574 4 0 7\n458 0 4 9\n330 0 2 9\n303 2 0 8\n... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe only difference between the ... | [{"type": "stdin_stdout", "input": "3\n3\n.X.\nXXX\n.X.\n6\nXX.XXX\nXXXXXX\nXXX.XX\nXXXXXX\nXX.X.X\nXXXXXX\n5\nXXX.X\n.X..X\nXXX.X\n..X..\n..X..\n", "output": "\n.X.\nXOX\n.X.\nXX.XXO\nXOXXOX\nOXX.XX\nXOOXXO\nXX.X.X\nOXXOXX\nXOX.X\n.X..X\nXXO.O\n..X..\n..X..\n"}, {"type": "stdin_stdout", "input": "3\n3\n.X.\nXXX\n.X.\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\nFloating-Point Numbers\n\nIn thi... | [{"type": "stdin_stdout", "input": "1\n0000000000100000000000000000000000000000000000000000\n2\n0000000000000000000000000000000000000000000000000000\n2\n0000000000000000001000000000000000000000000000000000\n11\n0000000000000000000000000000000000000000000000000000\n7\n1101000000000000000000000000000000000000000000000000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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**This Kata is intended as a sma... | [{"input": "\"aabbccdde\"", "output": "[\"e\"]", "fn_name": "no_repeat"}, {"input": "\"codewars\"", "output": "[\"c\"]", "fn_name": "no_repeat"}, {"input": "\"testing\"", "output": "[\"e\"]", "fn_name": "no_repeat"}, {"input": "\"Testing\"", "output": "[\"T\"]", "fn_name": "no_repeat"}, {"input": "\"wxyz\"", "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\nGiven an array of integers, retu... | [{"input": "[200, 30, 18, 8, 64, 34]", "output": "[2]", "fn_name": "scf"}, {"input": "[21, 45, 51, 27, 33]", "output": "[3]", "fn_name": "scf"}, {"input": "[133, 147, 427, 266]", "output": "[7]", "fn_name": "scf"}, {"input": "[3, 5, 7]", "output": "[1]", "fn_name": "scf"}, {"input": "[]", "output": "[1]", "fn_name": "s... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWrite a program which manipulate... | [{"type": "stdin_stdout", "input": "6\n2 1 2\n2 3 5\n0\n0\n0\n1 4\n7\n1 1\n0 3 12\n1 2\n0 4 20\n1 3\n0 3 40\n1 4", "output": "0\n0\n44\n112\n"}, {"type": "stdin_stdout", "input": "6\n2 1 2\n2 3 5\n0\n0\n0\n1 4\n7\n1 1\n0 3 6\n1 2\n0 4 20\n1 3\n0 5 40\n1 4", "output": "0\n0\n32\n146\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\nVasya adores sport programming. ... | [{"type": "stdin_stdout", "input": "100\n9999 9999 9999 9998 9998 9998 9997 9996 9996 9995 9993 9993 9991 9990 9989 9986 9984 9984 9983 9981 9981 10079 9980 9980 9979 9977 9977 9977 9977 9977 9976 9976 9975 9975 9973 9972 9972 9972 9972 9971 9969 9969 9969 9968 9967 9965 9962 9962 9962 9962 9960 9958 9958 9955 9954 995... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIt is known that the area of a r... | [{"type": "stdin_stdout", "input": "100\n", "output": "30000\n"}, {"type": "stdin_stdout", "input": "270", "output": "218700\n"}, {"type": "stdin_stdout", "input": "256", "output": "196608\n"}, {"type": "stdin_stdout", "input": "203", "output": "123627\n"}, {"type": "stdin_stdout", "input": "196", "output": "115248\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\nBerland has a long and glorious ... | [{"type": "stdin_stdout", "input": "????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\n## The galactic games have begun... | [{"input": "50000000000000000000000000000000000000000", "output": "[583333333333333333333333333333333333333291666666666666666666666666666666666666668]", "fn_name": "solution"}, {"input": "50000000", "output": "[583333291666668]", "fn_name": "solution"}, {"input": "1000000", "output": "[233333166668]", "fn_name": "solut... | 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 olden days finding square roo... | [{"type": "stdin_stdout", "input": "3\n18\n10\n10000", "output": "4\n3\n100\n"}, {"type": "stdin_stdout", "input": "3\n17\n16\n10010", "output": "4\n4\n100\n"}, {"type": "stdin_stdout", "input": "3\n10\n5\n10010", "output": "3\n2\n100\n"}, {"type": "stdin_stdout", "input": "3\n1\n11\n10000", "output": "1\n3\n100\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\nSome time ago Mister B detected ... | [{"type": "stdin_stdout", "input": "108\n1 102 33 99 6 83 4 20 61 100 76 71 44 9 24 87 57 2 81 82 90 85 12 30 66 53 47 36 43 29 31 64 96 84 77 23 93 78 58 68 42 55 13 70 62 19 92 14 10 65 63 75 91 48 11 105 37 50 32 94 18 26 52 89 104 106 86 97 80 95 17 72 40 22 79 103 25 101 35 51 15 98 67 5 34 69 54 27 45 88 56 16 46... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWe have two distinct integers A ... | [{"type": "stdin_stdout", "input": "999999999 1000000000\n", "output": "IMPOSSIBLE\n"}, {"type": "stdin_stdout", "input": "369673908 845644227\n", "output": "IMPOSSIBLE\n"}, {"type": "stdin_stdout", "input": "232334010 962483782\n", "output": "597408896\n"}, {"type": "stdin_stdout", "input": "274100628 29096111\n", "ou... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nOf the real numbers, those with ... | [{"type": "stdin_stdout", "input": "3.2(145)", "output": "32113/9990\n"}, {"type": "stdin_stdout", "input": "3.3(145)", "output": "16556/4995\n"}, {"type": "stdin_stdout", "input": "5.21(43)", "output": "25811/4950\n"}, {"type": "stdin_stdout", "input": "3.3(155)", "output": "16561/4995\n"}, {"type": "stdin_stdout", "i... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nVasiliy is fond of solving diffe... | [{"type": "stdin_stdout", "input": "10\n1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000\naaaaaaaaaaab\nab\naab\naaab\naaaab\naaaaab\naaaaaab\naaaaaaab\naaaaaaaab\naaaaaaaaab\n", "output": "8000000000\n"}, {"type": "stdin_stdout", "input": "10\n1000000000 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\nYou are given $n$ one-dimensiona... | [{"type": "stdin_stdout", "input": "9\n4 3\n1 3\n7 9\n2 5\n3 6\n2 9\n1 4\n3 7\n1 3\n2 4\n3 5\n1 4\n6 7\n5 5\n4 3\n1 3\n7 9\n2 5\n3 6\n2 9\n1 4\n3 7\n1 3\n2 4\n3 5\n1 4\n6 7\n5 5\n1 4\n3 7\n", "output": "YES\nNO\nNO\nYES\nYES\nNO\nNO\nYES\nNO\n"}, {"type": "stdin_stdout", "input": "4\n4 3\n1 3\n7 9\n2 5\n3 6\n2 9\n1 4\n... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe restaurant AtCoder serves th... | [{"type": "stdin_stdout", "input": "123\n123\n123\n123\n123\n", "output": "643\n"}, {"type": "stdin_stdout", "input": "123\n123\n161\n123\n123", "output": "681\n"}, {"type": "stdin_stdout", "input": "123\n123\n161\n123\n163", "output": "721\n"}, {"type": "stdin_stdout", "input": "123\n123\n161\n123\n263", "output": "82... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nXenia is a girl being born a nob... | [{"type": "stdin_stdout", "input": "1\n10 10 10\n761 829 1037 1818 133 576 705 131 935 821\n896 163 569 957 169 475 342 1074 760 434\n131 383 243 247 908 799 56 1929 360 189\n", "output": "1928\n"}, {"type": "stdin_stdout", "input": "1\n10 10 10\n761 829 1037 1818 133 576 705 131 935 821\n896 163 569 656 169 475 342 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\nHideo Kojima has just quit his j... | [{"type": "stdin_stdout", "input": "100\n0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n", "output": "100\n"}, {"type": "stdin_stdout", "input": "100\n1 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\nYou want to make change for $ n ... | [{"type": "stdin_stdout", "input": "251195", "output": "10049\n"}, {"type": "stdin_stdout", "input": "467454", "output": "18702\n"}, {"type": "stdin_stdout", "input": "698278", "output": "27934\n"}, {"type": "stdin_stdout", "input": "323456", "output": "12940\n"}, {"type": "stdin_stdout", "input": "164898", "output": "... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThis year in Equestria was a yea... | [{"type": "stdin_stdout", "input": "1\n1\n34\n- 1\n+ 1\n+ 1\n+ 1\n+ 1\n+ 1\n+ 1\n+ 1\n+ 1\n+ 1\n- 1\n- 1\n- 1\n- 1\n- 1\n+ 2\n+ 2\n+ 2\n+ 2\n- 1\n+ 2\n+ 2\n- 1\n+ 2\n- 1\n+ 3\n+ 3\n+ 1\n- 1\n- 2\n- 2\n- 2\n+ 1\n+ 3\n", "output": "NO\nNO\nNO\nNO\nNO\nNO\nNO\nNO\nYES\nYES\nYES\nNO\nNO\nNO\nNO\nNO\nNO\nNO\nYES\nNO\nNO\nYE... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 permutation of length $n$ is a... | [{"type": "stdin_stdout", "input": "100\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n2\n13\n14\n23\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n35\n36\n90\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n69\n50\n51\n52\n53\n80\n55\n56\n57\n58\n59\n51\n61\n62\n103\n64\n65\n66\n67\n68\n69\n72\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\nRead problems statements in Mand... | [{"type": "stdin_stdout", "input": "2\n2 2\n2 2\n-4 6\n3 9\n1 2 -3\n-2 -1 -4", "output": "16\n44\n"}, {"type": "stdin_stdout", "input": "2\n2 4\n0 2\n-1 10\n3 3\n1 2 -3\n-4 3 -5", "output": "60\n32\n"}, {"type": "stdin_stdout", "input": "2\n2 4\n0 2\n-1 10\n3 1\n1 2 -3\n-4 3 -5", "output": "60\n22\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\nYour friend is developing a comp... | [{"type": "stdin_stdout", "input": "50 72\n35 38\n19 46\n35 12\n27 30\n23 41\n50 16\n31 6\n20 33\n38 1\n10 35\n13 43\n29 25\n25 4\n1 13\n4 20\n36 29\n13 47\n48 5\n30 21\n30 38\n28 50\n41 45\n25 43\n40 36\n19 47\n31 32\n26 28\n8 13\n43 24\n27 35\n14 29\n14 38\n50 9\n34 49\n12 34\n43 42\n41 15\n46 29\n48 11\n48 7\n40 29\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 town sheriff dislikes odd nu... | [{"input": "[82, 86, 71, 58, 44, 79, 50, 44, 79, 67, 82, 82, 55, 50]", "output": "[[44, 79, 50, 44, 79, 50]]", "fn_name": "odd_ones_out"}, {"input": "[100, 100, 5, 5, 100, 50, 68, 50, 68, 50, 68, 5, 100]", "output": "[[100, 100, 100, 100]]", "fn_name": "odd_ones_out"}, {"input": "[42, 72, 32, 4, 94, 82, 67, 67]", "outp... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSometimes Mister B has free even... | [{"type": "stdin_stdout", "input": "12 12 876543210 1000000000\n", "output": "13\n"}, {"type": "stdin_stdout", "input": "12 12 876543210 1000000000\n", "output": "13"}, {"type": "stdin_stdout", "input": "10 12 220000011 220000032\n", "output": "11\n"}, {"type": "stdin_stdout", "input": "5 10 1000000000 1000000000\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\n<image>\n\n\nThere used to be a ... | [{"type": "stdin_stdout", "input": "44 3\n45 10\n0 0", "output": "40\n33\n"}, {"type": "stdin_stdout", "input": "75 2\n16 14\n0 0", "output": "23\n10\n"}, {"type": "stdin_stdout", "input": "18 3\n45 10\n0 0", "output": "14\n33\n"}, {"type": "stdin_stdout", "input": "26 3\n45 10\n0 0", "output": "17\n33\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\nThere is a straight snowy road, ... | [{"type": "stdin_stdout", "input": "17\n.......RRRRR.....\n", "output": "8 13\n"}, {"type": "stdin_stdout", "input": "17\n.....RRRRR.......\n", "output": "6 11\n"}, {"type": "stdin_stdout", "input": "17\n......RRRRR......\n", "output": "7 12\n"}, {"type": "stdin_stdout", "input": "13\n....LLLLLL...\n", "output": "10 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 have a new professor of grap... | [{"type": "stdin_stdout", "input": "10 22\nazbrll oen\ngh vdyayei\njphveblohx vfglv\nmfyxib jepnvhcuwo\nrpikazqj uam\nl rx\nokjenof qpnyi\nj tixqrno\nod itozmfct\nikkdxmirx ev\nqexftojc p\nkdazb zjs\nmbk ykvqjrxaxu\nhbcwhouzq pwt\nmirpsz zfaegpl\nuhkkvcj rlvwj\nef iqnnwtolrc\npjzfcpmeag ecdayth\nsa qcthz\ncbfhfxi qrnbv... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 to calculate co... | [{"input": "1000000", "output": "[30001.3]", "fn_name": "tax_calculator"}, {"input": "30.49", "output": "[2.21]", "fn_name": "tax_calculator"}, {"input": "\"monkey\"", "output": "[0]", "fn_name": "tax_calculator"}, {"input": "11", "output": "[1.07]", "fn_name": "tax_calculator"}, {"input": "15", "output": "[1.35]", "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 music, if you double (or halv... | [{"input": "261.625", "output": "[\"C\"]", "fn_name": "get_note"}, {"input": "523.25", "output": "[\"C\"]", "fn_name": "get_note"}, {"input": "1046.5", "output": "[\"C\"]", "fn_name": "get_note"}, {"input": "440", "output": "[\"A\"]", "fn_name": "get_note"}, {"input": "220", "output": "[\"A\"]", "fn_name": "get_note"},... | 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\nMoamen and Ezzat are playing a g... | [{"type": "stdin_stdout", "input": "5\n200000 200000\n200000 200000\n200000 200000\n200000 200000\n200000 200000\n", "output": "226490044\n226490044\n226490044\n226490044\n226490044\n"}, {"type": "stdin_stdout", "input": "5\n200000 200000\n200000 200000\n200000 200000\n200000 200000\n200000 200000\n", "output": "226490... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 is a positive integer N. C... | [{"type": "stdin_stdout", "input": "1000000000000\n", "output": "8\n"}, {"type": "stdin_stdout", "input": "200560490130\n", "output": "11\n"}, {"type": "stdin_stdout", "input": "755827200000\n", "output": "10\n"}, {"type": "stdin_stdout", "input": "366735600000\n", "output": "10\n"}, {"type": "stdin_stdout", "input": "... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn the evening Polycarp decided ... | [{"type": "stdin_stdout", "input": "27 8 1 0 1\nBcd A\nA b\nb BcDc\ndc dbaC\ndbaC dcCB\nB d\nd BbAc\nCBC b\nDBDca d\ncAbb AA\nAA Ba\ncAccb DBDca\ncb DdaB\nAAcBc Ba\nBa dc\ndc DDCd\nbcBDA da\nbDD ADD\nAA b\nb cb\ncb CCBbd\nCCBbd bcDdb\nbcDdb ddc\nddc C\nC Adc\nAdc BbAc\nBbAc DD\n", "output": "111\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\nEvlampiy has found one more cool... | [{"type": "stdin_stdout", "input": "101 9\n3 2 2 1 4 1 3 2 3 4 3 2 3 1 4 4 1 1 4 1 3 3 4 1 2 1 1 3 1 2 2 4 3 1 4 3 1 1 4 4 1 2 1 1 4 2 3 4 1 2 1 4 4 1 4 3 1 4 2 1 2 1 4 3 4 3 4 2 2 4 3 2 1 3 4 3 2 2 4 3 3 2 4 1 3 2 2 4 1 3 4 2 1 3 3 2 2 1 1 3 1\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "101 9\n3 2 2 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\nVladimir would like to prepare a... | [{"type": "stdin_stdout", "input": "1\n7 7\n873108721 195635452\n42649954 997221147\n873108721 1003477544\n1087176458 873108721\n1130734166 858693746\n1309378041 372607189\n1000000000 427003887\n", "output": "7410830018\n"}, {"type": "stdin_stdout", "input": "1\n7 7\n873108721 195635452\n66631086 997221147\n1700956320 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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\n2 6\n16 17", "output": "30\n118740505\n"}, {"type": "stdin_stdout", "input": "2\n2 6\n19 17", "output": "30\n361105078\n"}, {"type": "stdin_stdout", "input": "2\n2 6\n29 17", "output": "30\n684841218\n"}, {"type": "stdin_stdout", "input": "2\n2 6\n19 34", "output": "30\n525446287\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWrite a program which reads an i... | [{"type": "stdin_stdout", "input": "71983", "output": "19:59:43\n"}, {"type": "stdin_stdout", "input": "-1025", "output": "-1:42:55\n"}, {"type": "stdin_stdout", "input": "-144", "output": "-1:57:36\n"}, {"type": "stdin_stdout", "input": "-274", "output": "-1:55:26\n"}, {"type": "stdin_stdout", "input": "-399", "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 four integer value... | [{"type": "stdin_stdout", "input": "3\n2 2 1 0\n2 1 1 1\n1 2 3 2\n", "output": "YES\nYES\nYES\n"}, {"type": "stdin_stdout", "input": "3\n2 2 1 0\n1 1 1 1\n1 2 3 2\n", "output": "YES\nNO\nYES\n"}, {"type": "stdin_stdout", "input": "3\n3 2 1 0\n1 1 1 1\n1 2 3 2\n", "output": "YES\nNO\nYES\n"}, {"type": "stdin_stdout", "i... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYour mission in this problem is ... | [{"type": "stdin_stdout", "input": "H 1\neI 5\nC 12\nO 16\nF 22\nNe 24\nEu 64\nCc 241\nEND_OF_FIRST_PART\nG2C\n(MhF)2As\nCu(OH)2\nH((CO)2F)99\n0", "output": "UNKNOWN\nUNKNOWN\nUNKNOWN\n7723\n"}, {"type": "stdin_stdout", "input": "H 0\nHe 4\nC 12\nO 26\nF 2\nOe 36\nvC 64\nCc 603\nEND_OF_FIRST_PART\nH2B\n(MgF)2As\nBu(OH)... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 is a lazy student. He has... | [{"type": "stdin_stdout", "input": "233 100 1\n2 2 1 1 1 2 2 2 2 1 1 2 2 2 1 2 2 1 1 1 2 2 1 1 1 1 2 1 2 2 1 1 2 2 1 2 2 1 2 1 2 1 2 2 2 1 1 1 1 2 1 2 1 1 2 1 1 2 2 1 2 1 2 1 1 1 1 1 1 1 1 1 2 1 2 2 2 1 1 2 2 1 1 1 1 2 1 1 2 1 2 2 2 1 1 1 2 2 2 1 1 1 1 2 1 2 1 1 1 1 2 2 2 1 1 2 1 2 1 1 1 1 1 2 1 1 1 1 1 2 1 1 2 2 1 2 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 making your very own boa... | [{"input": "\"k\"\n\"A\"", "output": "[\"k\"]", "fn_name": "fight_resolve"}, {"input": "\"K\"\n\"a\"", "output": "[\"K\"]", "fn_name": "fight_resolve"}, {"input": "\"K\"\n\"A\"", "output": "[-1]", "fn_name": "fight_resolve"}, {"input": "\"S\"\n\"A\"", "output": "[-1]", "fn_name": "fight_resolve"}, {"input": "\"k\"\n\"s... | 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\nBurenka came to kindergarden. Th... | [{"type": "stdin_stdout", "input": "7\n1000000000 999999999 999999999 999999998\n999999997 999999996 999999996 999999995\n999999994 999999993 999999993 999999992\n999999991 999999990 999999990 999999989\n999999988 999999987 999999987 999999986\n999999985 999999984 999999984 999999983\n999999982 999999981 999999981 9999... | code_stdio |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.