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\nHag is a very talented person. H... | [{"type": "stdin_stdout", "input": "10 10\n0 -100000000\n1 -100000000\n1566 -99999999\n2088 -99999997\n2610 -99999994\n3132 -99999990\n3654 -99999985\n4176 -99999979\n4698 -99999972\n5220 -99999964\n1 2 5\n2 1\n1 1 7\n2 5\n1 5 4\n1 4 2\n2 8\n1 7 9\n2 1\n1 2 10\n", "output": "0.0000000000 -100000000.0000000000\n-7.37265... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 girl Margarita is a big f... | [{"type": "stdin_stdout", "input": "10\n449347852 741090797\n541919355 938202256\n442458747 465872502\n463474612 789217678\n146477812 390217056\n302933612 477640295\n180229640 877876778\n173202385 444484701\n78807265 428215825\n194590462 818327464\n", "output": "-145871473\n198141451\n11706878\n626346145\n268347434\n-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 two integers $a$ a... | [{"type": "stdin_stdout", "input": "2\n4 6 5\n1 1\n1 3\n1 5\n1 7\n1 9\n7 10 2\n7 8\n100 200\n", "output": "0 0 0 2 4 \n0 91 \n"}, {"type": "stdin_stdout", "input": "1\n199 200 1\n1 1000000000000000000\n", "output": "994974874371859201 \n"}, {"type": "stdin_stdout", "input": "1\n200 200 1\n1 1000000000000000000\n", "out... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nBy the age of three Smart Beaver... | [{"type": "stdin_stdout", "input": "12 26\n18 5 13 38 33 11 30 24 6 34 11 30\n2 1 12\n2 1 12\n2 1 11\n1 3 15\n1 11 5\n2 1 11\n2 2 10\n2 3 12\n2 2 11\n2 3 11\n2 3 10\n2 3 11\n1 9 37\n1 2 37\n2 1 11\n1 3 30\n2 2 12\n1 4 42\n2 3 10\n2 1 11\n1 11 26\n1 7 37\n2 3 11\n1 7 30\n1 6 40\n1 7 13\n", "output": "8683\n8683\n4363\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\nThis is the hard version of the ... | [{"type": "stdin_stdout", "input": "2\n1000000000 1000000000\n", "output": "0\n1000000000 1000000000 "}, {"type": "stdin_stdout", "input": "7\n1 3 2 2 4 5 4\n", "output": "3\n3 1 4 2 4 2 5 "}, {"type": "stdin_stdout", "input": "5\n1 2 2 4 5\n", "output": "2\n2 1 4 2 5 "}, {"type": "stdin_stdout", "input": "4\n1 1 2 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\nBob is playing a game of Spacesh... | [{"type": "stdin_stdout", "input": "2\n4 4\n9\n1 1 1\n1 2 1\n1 3 1\n2 1 2\n2 2 2\n2 3 2\n2 3 1\n2 2 1\n2 1 1\n", "output": "7\n6\n5\n4\n3\n2\n2\n3\n4\n"}, {"type": "stdin_stdout", "input": "3\n3 1 1\n6\n1 1 1\n1 2 1\n1 2 2\n1 1 2\n1 1 3\n1 2 3\n", "output": "4\n3\n3\n4\n3\n4\n"}, {"type": "stdin_stdout", "input": "2\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 are N people standing on t... | [{"type": "stdin_stdout", "input": "10 3\n8 7 100\n7 9 100\n9 8 100\n", "output": "No\n"}, {"type": "stdin_stdout", "input": "3 3\n1 2 1\n2 3 1\n1 3 2\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "4 3\n2 1 1\n2 3 5\n3 4 2\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "3 3\n1 2 1\n2 3 1\n1 3 5\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\nWe have a tree with N vertices n... | [{"type": "stdin_stdout", "input": "8\n2 7 2 5 4 1 7 5\n3 1\n1 2\n2 7\n4 5\n5 6\n6 8\n7 8\n", "output": "18\n15\n0\n14\n23\n0\n23\n0\n"}, {"type": "stdin_stdout", "input": "5\n1 2 3 4 5\n1 2\n2 3\n3 4\n3 5\n", "output": "5\n8\n10\n5\n5\n"}, {"type": "stdin_stdout", "input": "3\n1 2 1\n1 2\n2 3\n", "output": "5\n4\n0\n"... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn the year 2168, AtCoder Inc., ... | [{"type": "stdin_stdout", "input": "10\n64 55 27 35 76 119 7 18 49 100\n29 19 31 39 27 48 41 87 55 70\n", "output": "20291.000000000000\n"}, {"type": "stdin_stdout", "input": "2\n60 50\n34 38\n", "output": "2632.000000000000000\n"}, {"type": "stdin_stdout", "input": "3\n12 14 2\n6 2 7\n", "output": "76.000000000000000\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nKattapa, as you all know was one... | [{"type": "stdin_stdout", "input": "3\n2 3 4\n\n\n", "output": "READY FOR BATTLE\n"}, {"type": "stdin_stdout", "input": "4\n11 12 13 14\n\n\n", "output": "NOT READY\n"}, {"type": "stdin_stdout", "input": "5\n1 2 3 4 5\n\n\n", "output": "NOT READY\n"}, {"type": "stdin_stdout", "input": "1\n2\n\n\n", "output": "READY FOR... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA tree is an undirected connecte... | [{"type": "stdin_stdout", "input": "15 1\n12 9\n13 7\n1 3\n10 4\n9 2\n2 15\n11 4\n2 14\n10 8\n6 7\n12 5\n8 7\n3 10\n10 2\n", "output": "346\n"}, {"type": "stdin_stdout", "input": "13 3\n1 2\n3 2\n4 2\n5 2\n3 6\n10 6\n6 7\n6 13\n5 8\n5 9\n9 11\n11 12\n", "output": "114\n"}, {"type": "stdin_stdout", "input": "12 3\n5 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\n-----Input-----\n\nThe input con... | [{"type": "stdin_stdout", "input": "SMARTPHONE\n", "output": ""}, {"type": "stdin_stdout", "input": "REVOLVER\n", "output": ""}, {"type": "stdin_stdout", "input": "GENIUS\n", "output": ""}, {"type": "stdin_stdout", "input": "DOCTOR\n", "output": ""}, {"type": "stdin_stdout", "input": "HOLMES\n", "output": ""}, {"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\nYour city has n junctions. There... | [{"type": "stdin_stdout", "input": "100\n174 174 49 152 10 185 101 157 28 177 105 83 155 178 119 123 197 197 56 174 39 53 85 94 72 166 71 43 177 123 186 11 64 82 145 81 11 29 100 10 106 45 138 79 131 90 80 104 149 116 129 30 96 192 11 182 92 157 95 136 152 38 68 34 42 95 164 134 117 75 186 185 28 146 86 24 147 12 166 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\nGargari is jealous that his frie... | [{"type": "stdin_stdout", "input": "15\n2 6 9 4 8 9 10 10 3 8 8 4 4 8 7\n10 9 2 6 8 10 5 2 8 4 9 6 9 10 10\n3 1 5 1 6 5 1 6 4 4 3 3 9 8 10\n5 7 10 6 4 9 6 8 1 5 4 9 10 4 8\n9 6 10 5 8 6 9 9 3 4 4 7 6 2 4\n8 6 10 7 3 3 8 10 3 8 4 8 8 3 1\n7 3 6 8 8 5 5 8 3 7 2 6 3 9 7\n6 8 4 7 7 7 10 4 6 4 3 10 1 10 2\n1 6 7 8 3 4 2 8 1... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given an undirected grap... | [{"type": "stdin_stdout", "input": "11 7\n1 2 B\n1 3 R\n3 2 R\n4 5 R\n6 7 R\n8 9 R\n10 11 R\n", "output": "5\n3 4 6 8 10 \n"}, {"type": "stdin_stdout", "input": "6 6\n1 2 R\n1 3 R\n2 3 R\n4 5 B\n4 6 B\n5 6 B\n", "output": "-1\n"}, {"type": "stdin_stdout", "input": "6 5\n1 3 R\n2 3 R\n3 4 B\n4 5 R\n4 6 R\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\nWhile exploring the old caves, r... | [{"type": "stdin_stdout", "input": "5 5\n4\nacxxay\nasuuswzxyzwvxvwcbuvtxw\nasxyabczbusyscuatbuzczx\nazvwtyvxcsbcwuyvbzyubz\naayxsvybzvzbsaxccwxwzbcuwcuy\n0\ncctzttazzwytuxzttxwbvzbsvy\ncbwzsbsb\nca\nucwzvwv\nuatxuabttcxcysvuzywwxa\n1\nbvyyusbcuwactubtasbcbbcvwsawt\nwwbyzza\nwacsuvyaxvvvx\nwawccbzxcybzwbavcs\nwvbycwsxc... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYura is tasked to build a closed... | [{"type": "stdin_stdout", "input": "2\n1 2 3\n12 34 56\n", "output": "1\n11\n"}, {"type": "stdin_stdout", "input": "1\n2434 2442 14\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "1\n10 20 10\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "1\n3 4 5\n", "output": "1\n"}, {"type": "stdin_stdout", "input... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given an undirected unwe... | [{"type": "stdin_stdout", "input": "12\n8 7\n2 3\n3 4\n4 5\n5 2\n6 7\n7 8\n8 6\n1 0\n2 1\n1 2\n3 3\n1 2\n2 3\n1 3\n3 2\n2 3\n3 1\n4 4\n1 2\n2 3\n3 4\n4 1\n4 4\n1 2\n2 3\n3 1\n4 1\n6 9\n1 4\n1 5\n1 6\n2 4\n2 5\n2 6\n3 4\n3 5\n3 6\n100000 0\n1000 5\n55 56\n56 57\n57 58\n58 59\n59 55\n11 11\n1 2\n2 3\n3 4\n4 5\n5 6\n6 7\n... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWe have a sequence of length N c... | [{"type": "stdin_stdout", "input": "1234567894848\n", "output": "10\n1000 193 256 777 0 1 1192 1234567891011 48 425\n"}, {"type": "stdin_stdout", "input": "3\n", "output": "7\n27 0 0 0 0 0 0\n"}, {"type": "stdin_stdout", "input": "0\n", "output": "4\n3 3 3 3\n"}, {"type": "stdin_stdout", "input": "1\n", "output": "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\nYou are given an integer $x$ of ... | [{"type": "stdin_stdout", "input": "20 10\n21474836472147483648\n", "output": "20\n21474836482147483648\n"}, {"type": "stdin_stdout", "input": "20 19\n19999999999999999999\n", "output": "20\n20000000000000000002\n"}, {"type": "stdin_stdout", "input": "12 2\n121212121216\n", "output": "12\n131313131313\n"}, {"type": "st... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nHave you ever tried to explain t... | [{"type": "stdin_stdout", "input": "11 59 59 11 12\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "12 12 12 11 12\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "11 59 59 12 11\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "10 22 59 6 10\n", "output": "YES\n"}, {"type": "stdin_stdout",... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nTHE SxPLAY & KIVΛ - 漂流 KIVΛ & Ni... | [{"type": "stdin_stdout", "input": "10000000000000000 10000000000000000 100 100 10000000000000000 10000000000000000\n10000000000000000 10000000000000000 10000000000000000\n", "output": "1"}, {"type": "stdin_stdout", "input": "3449558549195209 933961699330867 25 92 2448338832051825 8082390281981957\n7818990402072641 984... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nFirecrackers scare Nian the mons... | [{"type": "stdin_stdout", "input": "3\n-10 4 10\n10 4 10\n0 -7 10\n", "output": "7\n"}, {"type": "stdin_stdout", "input": "3\n1 -7 10\n-7 9 10\n-2 -1 4\n", "output": "8\n"}, {"type": "stdin_stdout", "input": "3\n-3 -2 3\n-4 -6 3\n-6 -4 9\n", "output": "5\n"}, {"type": "stdin_stdout", "input": "3\n-2 -5 4\n-5 -1 5\n-6 -... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given two squares, one w... | [{"type": "stdin_stdout", "input": "-17 -91 -17 -27 -81 -27 -81 -91\n-48 -21 -12 -57 -48 -93 -84 -57\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "-100 -100 -100 -99 -99 -99 -99 -100\n-10 -10 -9 -9 -10 -8 -11 -9\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "-100 -100 100 -100 100 100 -100 100\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\nTokitsukaze and CSL are playing ... | [{"type": "stdin_stdout", "input": "14\n9 9 1000 2000 39999 48888 16 32 123456 959658 111 987584 125632 125468\n", "output": "sjfnb\n"}, {"type": "stdin_stdout", "input": "14\n9 9 1000 2000 39999 48888 16 32 123456 959658 111 987584 125632 125477\n", "output": "cslnb\n"}, {"type": "stdin_stdout", "input": "14\n6 66 89 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 dog show on TV is starting... | [{"type": "stdin_stdout", "input": "100 154\n132 88 72 98 184 47 176 56 68 168 137 88 188 140 198 18 162 139 94 133 90 91 37 156 196 28 186 1 51 47 4 92 18 51 37 121 86 195 153 195 183 191 15 24 104 174 94 83 102 61 131 40 149 46 22 112 13 136 133 177 3 175 160 152 172 48 44 174 77 100 155 157 167 174 64 109 118 194 12... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSuppose you have two polynomials... | [{"type": "stdin_stdout", "input": "121\n", "output": "121\n0 -1 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 1\n120\n-1 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\nThe elections to Berland parliam... | [{"type": "stdin_stdout", "input": "100 100 100 100\n71 22 92 3 19 90 1 16 88 56 62 37 56 84 52 46 4 64 21 19 37 54 21 81 56 33 71 57 86 75 62 42 79 67 14 8 66 30 13 38 20 71 36 66 46 55 4 99 18 37 7 24 72 46 32 86 87 7 90 93 96 94 21 23 62 53 16 11 11 83 21 81 68 50 85 9 94 60 47 41 34 82 11 12 95 81 61 81 86 85 64 36... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 Travelling Salesman spends a... | [{"type": "stdin_stdout", "input": "10011010111010010111111110001010001010001010110010110010010111101111000101110101010111100101001100011001001001111011111100011110101011011001101101001111111101010010110011111101110010001000111111100011000000111111111100011000000000110101111000001011101000110000111110110000010000010011... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 was recycling day in Kekoland... | [{"type": "stdin_stdout", "input": "235810013 344493922 0 0 975204641 211157253\n18\n977686151 621301932\n408277582 166435161\n595105725 194278844\n967498841 705149530\n551735395 659209387\n492239556 317614998\n741520864 843275770\n585383143 903832112\n272581169 285871890\n339100580 134101148\n920610054 824829107\n6579... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nTanechka is shopping in the toy ... | [{"type": "stdin_stdout", "input": "100000000000000 100000000000000\n", "output": "49999999999999\n"}, {"type": "stdin_stdout", "input": "100000000000000 99999999999999\n", "output": "49999999999999\n"}, {"type": "stdin_stdout", "input": "99999999999998 100000000000000\n", "output": "49999999999998\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\nYou've got a string $a_1, a_2, \... | [{"type": "stdin_stdout", "input": "25 999999998 999999999\n1011001110101010100111001\n", "output": "7999999985\n"}, {"type": "stdin_stdout", "input": "4 477963686 636258459\n0101\n", "output": "1114222145\n"}, {"type": "stdin_stdout", "input": "4 927391856 637236921\n1010\n", "output": "1274473842\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 well-known Fibonacci sequenc... | [{"type": "stdin_stdout", "input": "1 123456 961946\n", "output": "11954016000000000001 3158031000000000000\n"}, {"type": "stdin_stdout", "input": "1 999999 999999\n", "output": "9082426500000000001 9082426500000000000\n"}, {"type": "stdin_stdout", "input": "1 999599 123123\n", "output": "6053026500000000001 4902040500... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nBerkomnadzor — Federal Service f... | [{"type": "stdin_stdout", "input": "35\n-0.0.0.47\n+0.0.0.39/32\n+0.0.0.23\n+0.0.0.6/31\n-0.0.0.2\n+0.0.0.8/32\n+0.0.0.54/32\n-0.0.0.43\n-0.0.0.31/32\n-0.0.0.0\n+0.0.0.26/32\n-0.0.0.42\n+0.0.0.52\n-0.0.0.10/31\n+0.0.0.53\n+0.0.0.28/32\n-0.0.0.19/32\n-0.0.0.12\n-0.0.0.16/31\n-0.0.0.35/32\n+0.0.0.51\n+0.0.0.24/31\n-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\nOn the way to school, Karen beca... | [{"type": "stdin_stdout", "input": "10 10\n1 1 1 1 1 1 1 1 1 1\n1 1 1 1 1 1 1 1 1 1\n1 1 1 1 1 1 1 1 1 1\n1 1 1 1 1 1 1 1 1 1\n0 0 0 0 0 0 0 0 0 0\n1 1 1 1 1 1 1 1 1 1\n1 1 1 1 1 1 1 1 1 1\n1 1 1 1 1 1 1 1 1 1\n1 1 1 1 1 1 1 1 1 1\n1 1 1 1 1 1 1 1 1 1\n", "output": "9\nrow 1\nrow 2\nrow 3\nrow 4\nrow 6\nrow 7\nrow 8\nr... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 some game by Playrix it takes... | [{"type": "stdin_stdout", "input": "1000 1000 1000 1000\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "1000 1000 1 1000\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "1000 1000 1 400\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "1000 1000 1 999\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\nIahub got lost in a very big des... | [{"type": "stdin_stdout", "input": "999999989 38\n999999980 999999981\n10 8\n2 5\n999999978 999999981\n999999978 999999985\n7 9\n8 10\n9 10\n999999984 999999980\n6 6\n999999985 999999986\n999999982 999999978\n999999981 999999987\n8 5\n999999982 999999980\n999999989 999999980\n999999988 999999983\n999999982 999999984\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\nSnark and Philip are preparing t... | [{"type": "stdin_stdout", "input": "10 4\n1 0 1 0\n1 0 0 1\n1 1 0 1\n1 0 1 1\n1 1 0 1\n1 0 1 0\n0 0 0 0\n0 0 1 0\n1 0 1 0\n0 0 1 1\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "10 4\n1 0 1 0\n1 0 1 0\n0 1 1 1\n1 0 1 1\n1 1 0 1\n1 0 0 1\n0 1 1 1\n0 0 0 1\n1 1 1 1\n1 0 1 0\n", "output": "YES\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\nToday Pari and Arya are playing ... | [{"type": "stdin_stdout", "input": "61 531012\n698043 698043 698043 963349 698043 698043 698043 963349 698043 698043 698043 963349 698043 698043 698043 698043 966694 698043 698043 698043 698043 698043 698043 636247 698043 963349 698043 698043 698043 698043 697838 698043 963349 698043 698043 966694 698043 698043 698043 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 team of students from the city... | [{"type": "stdin_stdout", "input": "200\n2 1 1 2 2 2 2 1 1 2 2 2 1 1 2 2 2 2 1 1 1 2 2 2 2 2 2 1 2 2 1 1 1 1 2 1 2 2 1 2 2 2 2 1 2 2 1 1 1 1 2 2 1 1 1 1 1 2 2 2 2 1 2 1 2 2 2 2 1 1 1 2 1 2 2 2 2 1 1 1 1 1 1 2 2 2 1 2 2 2 1 2 2 2 1 1 1 2 2 1 1 1 1 2 2 1 2 1 1 1 2 2 1 1 2 2 2 1 2 2 0 1 2 1 1 2 2 2 1 2 2 1 1 1 2 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\nKevin has just recevied his disa... | [{"type": "stdin_stdout", "input": "93\n010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010\n", "output": "93\n"}, {"type": "stdin_stdout", "input": "89\n01010101010101010101010101010101010101010101010101010101101010101010101010100101010101010\n", "output": "89\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\nAs you have noticed, there are l... | [{"type": "stdin_stdout", "input": "100\n84 94 72 32 61 90 61 2 76 42 35 82 90 29 51 27 65 99 38 41 44 73 100 58 56 64 54 31 14 58 57 64 90 49 73 80 74 19 31 86 73 44 39 43 28 95 23 5 85 5 74 81 34 44 86 30 50 57 94 56 53 42 53 87 92 78 53 49 78 60 37 63 41 19 15 68 25 77 87 48 23 100 54 27 68 84 43 92 76 55 2 94 100 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\nSome days ago, I learned the con... | [{"type": "stdin_stdout", "input": "1000000\n", "output": "999996000003000000\n"}, {"type": "stdin_stdout", "input": "763116\n", "output": "444394078546562430\n"}, {"type": "stdin_stdout", "input": "756604\n", "output": "433115377058855412\n"}, {"type": "stdin_stdout", "input": "546924\n", "output": "163597318076822526... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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$ rectangles on ... | [{"type": "stdin_stdout", "input": "3\n-1000000000 -1000000000 -999999999 -999999999\n-1000000000 -1000000000 1000000000 1000000000\n-1000000000 -1000000000 -999999999 -999999999\n", "output": "-1000000000 -1000000000\n"}, {"type": "stdin_stdout", "input": "3\n999999999 -1000000000 1000000000 -999999999\n-1000000000 -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\nLimak is a little polar bear. He... | [{"type": "stdin_stdout", "input": "50\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\n", "output": "NO\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\nVasya and Petya wrote down all i... | [{"type": "stdin_stdout", "input": "1000000000\n", "output": "Vasya\n"}, {"type": "stdin_stdout", "input": "999999998\n", "output": "Vasya\n"}, {"type": "stdin_stdout", "input": "999999999\n", "output": "Vasya\n"}, {"type": "stdin_stdout", "input": "951352334\n", "output": "Petya\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\nInnopolis University scientists ... | [{"type": "stdin_stdout", "input": "20 20 80\n5 3\n13 13\n8 5\n2 9\n12 16\n1 11\n15 11\n3 20\n10 7\n5 4\n11 2\n5 20\n14 8\n5 1\n8 13\n11 5\n19 2\n15 12\n12 7\n16 5\n17 3\n12 2\n17 16\n12 3\n12 6\n18 20\n2 20\n9 1\n5 10\n9 18\n17 1\n17 10\n20 1\n12 12\n19 14\n7 8\n2 19\n6 14\n5 6\n15 2\n18 14\n5 7\n14 14\n17 2\n20 20\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\nGiven are an integer N and four ... | [{"type": "stdin_stdout", "input": "1000\nB\nA\nA\nA\n", "output": "589888339\n"}, {"type": "stdin_stdout", "input": "1000\nA\nB\nA\nA\n", "output": "336052903\n"}, {"type": "stdin_stdout", "input": "1000\nB\nB\nA\nA\n", "output": "336052903\n"}, {"type": "stdin_stdout", "input": "1000\nB\nA\nB\nA\n", "output": "336052... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 has a frog and a flower. Hi... | [{"type": "stdin_stdout", "input": "999983\n651224 992349\n803017 393514\n258455 402487\n888310 244420\n", "output": "126531\n"}, {"type": "stdin_stdout", "input": "1000000\n220036 846131\n698020 485511\n656298 242999\n766802 905433\n", "output": "5297\n"}, {"type": "stdin_stdout", "input": "1000000\n661647 690400\n864... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 infinitely many cards,... | [{"type": "stdin_stdout", "input": "100\n1193226 1193227 1193228 1321766 2059359 2059360 2059361 2059362 3026992 3026993 3251387 3464481 3464482 3464483 3464484 3464485 3464486 3464487 3464488 3464489 3464490 3846512 3846513 3849100 3849101 3849102 3911410 3911411 3911412 4750647 5162888 5162889 5162890 5162891 5162892... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 integer sequence is called be... | [{"type": "stdin_stdout", "input": "1 72 110 39\n", "output": "YES\n0 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 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 given a table consisting... | [{"type": "stdin_stdout", "input": "20 8\n4 3 2 1 5 6 7 8\n1 2 3 4 8 7 6 5\n1 2 3 4 5 6 7 8\n1 2 3 4 5 6 7 8\n1 2 3 4 5 6 7 8\n1 2 3 4 5 6 7 8\n1 2 3 4 5 6 7 8\n1 2 3 4 5 6 7 8\n1 2 3 4 5 6 7 8\n1 2 3 4 5 6 7 8\n1 2 3 4 5 6 7 8\n1 2 3 4 5 6 7 8\n1 2 3 4 5 6 7 8\n1 2 3 4 5 6 7 8\n1 2 3 4 5 6 7 8\n1 2 3 4 5 6 7 8\n1 2 3 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSometimes Mister B has free even... | [{"type": "stdin_stdout", "input": "12 12 876543210 1000000000\n", "output": "13"}, {"type": "stdin_stdout", "input": "10 12 220000011 220000032\n", "output": "11"}, {"type": "stdin_stdout", "input": "5 6 1000000000 1000000000\n", "output": "1"}, {"type": "stdin_stdout", "input": "12 1 100000011 100000024\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\nOne common way of digitalizing s... | [{"type": "stdin_stdout", "input": "50 20\n592183311 362557946 154127088 616872926 395353745 675069471 509655682 79915471 356656666 937992998 304422065 724106263 472338455 792258113 796069631 663370025 201799298 566151622 722278085 508905399 703159587 690854023 925377265 11010958 69791159 990158269 535460930 167415727 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 names of two days ... | [{"type": "stdin_stdout", "input": "wednesday\nwednesday\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "wednesday\nsaturday\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "wednesday\nsaturday\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "wednesday\nthursday\n", "output": "NO\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\nYou are given a positive integer... | [{"type": "stdin_stdout", "input": "1000000000000\n", "output": "109\n"}, {"type": "stdin_stdout", "input": "999999999992\n", "output": "200\n"}, {"type": "stdin_stdout", "input": "290687942106\n", "output": "153\n"}, {"type": "stdin_stdout", "input": "324278748889\n", "output": "160\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\nRecently, a start up by two stud... | [{"type": "stdin_stdout", "input": "OVWIHIWVYXMVAAAATOXWOIUUHYXHIHHVUIOOXWHOXTUUMUUVHVWWYUTIAUAITAOMHXWMTTOIVMIVOTHOVOIOHYHAOXWAUVWAVIVM\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "QDPINBMCRFWXPDBFGOZVVOCEMJRUCTOADEWEGTVBVBFWWRPGYEEYGPRWWFBVBVTGEWEDAOTCURJMECOVVZOGFBDPXWFRCMBNIPDQ\n", "output": "NO\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\"Night gathers, and now my watc... | [{"type": "stdin_stdout", "input": "205\n5 5 3 3 6 2 9 3 8 9 6 6 10 8 1 5 3 3 1 2 9 9 9 3 9 10 3 9 8 3 5 6 6 4 6 9 2 9 10 9 5 6 6 7 4 2 6 3 4 1 10 1 7 2 7 7 3 2 6 5 5 2 9 3 8 8 7 6 6 4 2 2 6 2 3 5 7 2 2 10 1 4 6 9 2 3 7 2 2 7 4 4 9 10 7 5 8 6 5 3 6 10 2 7 5 6 6 8 3 3 9 4 3 5 7 9 3 2 1 1 3 2 1 9 3 1 4 4 10 2 5 5 8 1 4 8... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nFor a positive integer n, let us... | [{"type": "stdin_stdout", "input": "100000000\n", "output": "914705724\n"}, {"type": "stdin_stdout", "input": "91304885\n", "output": "555850206\n"}, {"type": "stdin_stdout", "input": "89317875\n", "output": "494668252\n"}, {"type": "stdin_stdout", "input": "78876118\n", "output": "915018436\n"}, {"type": "stdin_stdout... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given $n$ integer number... | [{"type": "stdin_stdout", "input": "150\n0 0 0 0 0 0 0 2537672836907008 0 0 0 0 0 0 16384 0 0 0 0 34360787232 0 0 70871155232 0 0 0 0 0 0 0 0 0 0 0 2256197860262016 0 0 0 0 0 0 0 0 0 0 536872961 0 0 0 0 0 0 0 0 0 0 33619968 0 0 0 0 0 0 0 0 0 0 0 0 37189881297899520 0 18031990695526400 0 0 1099511627776 0 0 0 0 0 0 0 0 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere are n students at Berland ... | [{"type": "stdin_stdout", "input": "20 1 7\n20 8 10 7 14 9 17 19 19 9 20 6 1 14 11 15 12 10 20 15\n10 3 20 1 16 7 8 19 3 17 9 2 20 14 20 2 20 9 2 4\n", "output": "152\n1 \n3 5 8 10 13 15 17 \n"}, {"type": "stdin_stdout", "input": "19 14 2\n5 3 4 10 5 7 10 9 2 5 4 3 2 3 10 10 6 4 1\n6 10 5 3 8 9 9 3 1 6 4 4 3 6 8 5 9 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\nOne day student Vasya was sittin... | [{"type": "stdin_stdout", "input": "15 84\n11 9\n3 11\n13 10\n2 12\n5 9\n1 7\n14 4\n14 2\n14 1\n11 8\n1 8\n14 10\n4 15\n10 5\n5 12\n13 11\n6 14\n5 7\n12 11\n9 1\n10 15\n2 6\n7 15\n14 9\n9 7\n11 14\n8 15\n12 7\n13 6\n2 9\n9 6\n15 3\n12 15\n6 15\n4 6\n4 1\n9 12\n10 7\n6 1\n11 10\n2 3\n5 2\n13 2\n13 3\n12 6\n4 3\n5 8\n12 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 Tower of Hanoi is a well-kno... | [{"type": "stdin_stdout", "input": "0 10000 10000\n10000 0 10000\n10000 10000 0\n40\n", "output": "10995116277750000\n"}, {"type": "stdin_stdout", "input": "0 3003 1005\n4320 0 1463\n4961 5563 0\n40\n", "output": "3633519425831590\n"}, {"type": "stdin_stdout", "input": "0 9916 3929\n5389 0 6509\n2557 4099 0\n38\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\nBash wants to become a Pokemon m... | [{"type": "stdin_stdout", "input": "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBbbbbbbbbbbbbbbbbbbbbuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuullllllllllllllllllllssssssssssssssssssssaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nMisha and Vanya have played seve... | [{"type": "stdin_stdout", "input": "1 1000000000 1000000000\n", "output": "2000000000\n"}, {"type": "stdin_stdout", "input": "1000000000 1000000000 1000000000\n", "output": "2\n"}, {"type": "stdin_stdout", "input": "2 1000000000 1000000000\n", "output": "1000000000\n"}, {"type": "stdin_stdout", "input": "1000000000 999... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nKostya likes Codeforces contests... | [{"type": "stdin_stdout", "input": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nJulia is going to cook a chicken... | [{"type": "stdin_stdout", "input": "1000000000000000000 1000000000000000000 1000000000000000000\n", "output": "1000000000000000000.0\n"}, {"type": "stdin_stdout", "input": "999999999999999999 1000000000000000000 1000000000000000000\n", "output": "1000000000000000000.5\n"}, {"type": "stdin_stdout", "input": "57452097635... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAll of us love treasures, right?... | [{"type": "stdin_stdout", "input": "2 250\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\nTakahashi is about to assemble a... | [{"type": "stdin_stdout", "input": "44242\n1 2 1 1 3 2 2 1 1 2 1 1 3 3 2 1 3 3 1 1 2 4 2 1 3 3 1 2 1 4 2 1 4 1 1 3 1 1 1 2 3 1 3 1 1 3 2 2 2 1 2 2 2 2 3 1 3 2 2 2 2 2 2 1 4 3 1 2 1 2 2 1 2 5 1 1 3 5 2 2 1 3 6 2 1 2 1 1 3 1 1 1 1 4 1 2 2 1 1 1 2 1 2 3 1 4 1 1 1 2 2 3 1 1 1 2 3 1 1 4 1 1 2 2 2 4 2 3 1 1 2 3 2 2 2 2 2 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 have an integer sequence of ... | [{"type": "stdin_stdout", "input": "1000\n-192930591 -369019034 -827740421 -790441356 -636463250 -819858653 -190634159 -688053134 -931250418 -111365495 -669006097 -227918242 -451591748 -269188033 -541900126 -599182344 -561221849 -629956827 -480216666 -203942185 -574675488 -438214103 -294979780 -476124432 -688704865 -36... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nEfim just received his grade for... | [{"type": "stdin_stdout", "input": "320 142\n2704701300865535.432223312233434114130011113220102420131323010344144201124303144444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444447444444444444444444444444444444615444444482101673308979557675074444444444444446... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 each string s consisting of ... | [{"type": "stdin_stdout", "input": "105 2 598 780\n", "output": "1111111111111111111111111111111111111101100000000000000\n"}, {"type": "stdin_stdout", "input": "1000000000 1000000000 1000000000 1000000000\n", "output": "Impossible\n"}, {"type": "stdin_stdout", "input": "499928010 601314341 398636540 499991253\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\nA game field is a strip of 1 × n... | [{"type": "stdin_stdout", "input": "100\n************************************************************P***************************************\n", "output": "138\n"}, {"type": "stdin_stdout", "input": "100\n........*P**...*.*.*.*..*.*.**...*.*.....*..............*..**.............*..........*.*..*..*.**...\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\nImagine you have an infinite 2D ... | [{"type": "stdin_stdout", "input": "30426905\n", "output": "172120564\n"}, {"type": "stdin_stdout", "input": "38450759\n", "output": "217510336\n"}, {"type": "stdin_stdout", "input": "19863843\n", "output": "112366864\n"}, {"type": "stdin_stdout", "input": "24562258\n", "output": "138945112\n"}, {"type": "stdin_stdout"... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given a rectangle grid. ... | [{"type": "stdin_stdout", "input": "1000000000 1000000000 286536427 579261823 230782719 575570138\n", "output": "171145067 291476754 401927786 867046892\n"}, {"type": "stdin_stdout", "input": "1000000000 1000000000 623214043 753726318 970868535 929707704\n", "output": "29131465 70292296 1000000000 1000000000\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\nMaxim has opened his own restaur... | [{"type": "stdin_stdout", "input": "50\n15 28 34 29 17 21 20 34 37 17 10 20 37 10 18 25 31 25 16 1 37 27 39 3 5 18 2 32 10 35 20 17 29 20 3 29 3 25 9 32 37 5 25 23 25 33 35 8 31 29\n39\n", "output": "1.4997987526\n"}, {"type": "stdin_stdout", "input": "49\n46 42 3 1 42 37 25 21 47 22 49 50 19 35 32 35 4 50 19 39 1 39 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\nJon Snow now has to fight with W... | [{"type": "stdin_stdout", "input": "119 12 653\n877 938 872 962 590 500 422 249 141 163 609 452 594 768 316 530 838 945 658 636 997 938 941 272 102 8 713 862 572 809 301 462 282 478 12 544 157 204 367 789 136 251 754 43 349 355 560 325 463 659 666 644 992 603 799 597 364 234 903 377 896 92 971 308 617 712 480 772 170 6... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nNick has n bottles of soda left ... | [{"type": "stdin_stdout", "input": "90\n4 2 21 69 53 39 2 2 8 58 7 5 2 82 7 9 13 10 2 44 1 7 2 1 50 42 36 17 14 46 19 1 50 20 51 46 9 59 73 61 76 4 19 22 1 43 53 2 5 5 32 7 5 42 30 14 32 6 6 15 20 24 13 8 5 19 9 9 7 20 7 2 55 36 5 33 64 20 22 22 9 30 67 38 68 2 13 19 2 9\n48 4 39 85 69 70 11 42 65 77 61 6 60 84 67 15 9... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAlice and Bob decided to eat som... | [{"type": "stdin_stdout", "input": "420196140727489673 679891637638612258\n", "output": "1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B\n"}, {"type": "stdin_stdout", "input": "498454011879264 8065... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nMad scientist Mike is building a... | [{"type": "stdin_stdout", "input": "999999999999999999 1000000000000000000\n", "output": "1000000000000000000\n"}, {"type": "stdin_stdout", "input": "999999999999999991 1000000000000000000\n", "output": "111111111111111120\n"}, {"type": "stdin_stdout", "input": "999999999999999993 999999999999999991\n", "output": "4999... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 and Aoki are playing a... | [{"type": "stdin_stdout", "input": "200\n48018902 1000000000\n671608134 1000000000\n821230959 1000000000\n839046240 1000000000\n871451860 1000000000\n201326387 1000000000\n95653264 1000000000\n118998199 1000000000\n661381768 1000000000\n265950246 1000000000\n443323091 1000000000\n621558889 1000000000\n486583499 1000000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 participants are each given ... | [{"type": "stdin_stdout", "input": "12 12\n7 6 3 8 8 4 4 7 1 9 9 5 7 5 4 9 8 6 2 7 7 3 3 6\n9 1 2 4 9 8 5 3 6 7 3 8 2 7 5 9 6 4 3 1 2 6 1 4\n", "output": "-1\n"}, {"type": "stdin_stdout", "input": "12 12\n1 6 2 6 8 3 6 4 4 8 7 2 7 5 9 4 2 4 9 5 8 5 3 6\n2 8 6 9 2 6 7 4 6 5 6 3 5 8 7 8 7 1 1 9 9 7 7 3\n", "output": "-1\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given a broken clock. Yo... | [{"type": "stdin_stdout", "input": "24\n17:30\n", "output": "17:30\n"}, {"type": "stdin_stdout", "input": "12\n17:30\n", "output": "07:30\n"}, {"type": "stdin_stdout", "input": "24\n99:99\n", "output": "09:09\n"}, {"type": "stdin_stdout", "input": "12\n05:54\n", "output": "05:54\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\nWe have an undirected weighted g... | [{"type": "stdin_stdout", "input": "1000 2000\n501595328391\n685 363 621930471\n271 301 997970019\n502 556 984052191\n139 71 698618010\n184 956 806848809\n34 192 970227157\n632 755 658607560\n457 495 998339340\n861 689 187827317\n626 629 901887806\n578 388 973419851\n719 961 867860866\n392 148 606586530\n457 861 990309... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nTo improve the boomerang throwin... | [{"type": "stdin_stdout", "input": "4\n3 3 3 1\n", "output": "7\n1 1\n1 2\n2 2\n2 3\n3 3\n3 4\n4 4\n"}, {"type": "stdin_stdout", "input": "6\n2 0 3 0 1 1\n", "output": "5\n1 1\n1 6\n2 3\n2 5\n3 5\n"}, {"type": "stdin_stdout", "input": "4\n3 3 2 1\n", "output": "6\n1 1\n1 2\n2 2\n2 3\n3 3\n3 4\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\nAstronaut Natasha arrived on Mar... | [{"type": "stdin_stdout", "input": "100 30\n30 30 30 90 30 30 90 90 30 90 30 90 90 30 30 30 60 60 60 30 30 60 90 90 90 60 30 90 60 60 90 60 60 60 30 60 60 60 60 90 60 30 60 90 90 90 60 60 90 60 60 60 60 30 30 60 30 60 60 90 30 60 60 60 90 60 90 30 30 60 30 90 90 90 90 60 90 30 30 60 60 30 60 60 60 30 90 60 60 60 90 60 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA team of furry rescue rangers w... | [{"type": "stdin_stdout", "input": "-10000 -10000 10000 10000\n1000 1000\n-454 -891\n-454 -891\n", "output": "17933348.203209973872\n"}, {"type": "stdin_stdout", "input": "-10000 10000 10000 -10000\n1000 1000\n-891 454\n-891 454\n", "output": "17933348.203209973872\n"}, {"type": "stdin_stdout", "input": "-10000 -10000 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given an integer sequenc... | [{"type": "stdin_stdout", "input": "2000 1161 195\n120890687 120890687 120890687 120890687 120890687 120890687 120890687 120890687 120890687 120890687 120890687 120890687 120890687 120890687 120890687 120890687 120890687 120890687 120890687 120890687 120890687 120890687 120890687 120890687 120890687 120890687 120890687... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 team of N people. For... | [{"type": "stdin_stdout", "input": "1000000000 5000\n", "output": "642932262\n"}, {"type": "stdin_stdout", "input": "158260522 4575\n", "output": "875142289\n"}, {"type": "stdin_stdout", "input": "602436426 4445\n", "output": "582490088\n"}, {"type": "stdin_stdout", "input": "262703497 2202\n", "output": "813734619\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\nA never-ending, fast-changing an... | [{"type": "stdin_stdout", "input": "33 22\n", "output": "804201731\n"}, {"type": "stdin_stdout", "input": "45 19\n", "output": "486112971\n"}, {"type": "stdin_stdout", "input": "48 20\n", "output": "804531912\n"}, {"type": "stdin_stdout", "input": "50 33\n", "output": "805999139\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\nPavel loves grid mazes. A grid m... | [{"type": "stdin_stdout", "input": "19 20 196\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\nIn Arcady's garden there grows a... | [{"type": "stdin_stdout", "input": "100\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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nDetermine if there exists a sequ... | [{"type": "stdin_stdout", "input": "273409 100000 100000\n", "output": "273409 100000 100000\n"}, {"type": "stdin_stdout", "input": "300000 150000 150001\n", "output": "300000 150000 150001\n"}, {"type": "stdin_stdout", "input": "253009 100000 100000\n", "output": "253009 100000 100000\n"}, {"type": "stdin_stdout", "in... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nDima the hamster enjoys nibbling... | [{"type": "stdin_stdout", "input": "36\n3 41 82 123 174 216 432 864 1080 1228 2149 4298 8596 11052 22104 33156 35919 71838 179595 359190 431028 862056 994680 1315440 1753920 3507840 7015680 10523520 21047040 26500200 53000400 106000800 132501000 176668000 353336000 530004000\n", "output": "Yes\n"}, {"type": "stdin_stdo... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given an array of positi... | [{"type": "stdin_stdout", "input": "100 10000000\n300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 30... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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\nRecently, the Fair Nut has writt... | [{"type": "stdin_stdout", "input": "100 1000000000\nbbabbaabbbaaaaabbabbbaaabbbbabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbaabbbbabaabbbabbaaaaabbbbaab\nbbabbaabbbaaaaabbabbbaaabbbbabbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaababbbabbbbaaaaabbaaaaaaaab\n", "output": "41073741883\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\nPeter had a cube with non-zero l... | [{"type": "stdin_stdout", "input": "-1000000 1000000 1000000\n-1000000 -1000000 -1000000\n-1000000 1000000 -1000000\n1000000 1000000 1000000\n1000000 -1000000 -1000000\n-1000000 1000000 1000000\n-1000000 -1000000 1000000\n1000000 1000000 -1000000\n", "output": "YES\n-1000000 1000000 1000000\n-1000000 -1000000 -1000000\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given an array of $n$ in... | [{"type": "stdin_stdout", "input": "40\n299996490 299992830 49999865 299990010 299989770 299998110 19999942 299981910 299982990 299997210 299996670 299995890 299987790 299988030 299980110 299984430 299997870 299992170 299979510 299991390 299989110 299982030 299978670 299983890 299994690 299989590 149999865 299982570 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\nAndrew was very excited to parti... | [{"type": "stdin_stdout", "input": "100000000\n30\n30\n", "output": "10\n"}, {"type": "stdin_stdout", "input": "100000000\n31\n33\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "23456789\n66\n100\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "99999999\n90\n100\n", "output": "9\n"}, {"type": "stdin_st... | code_stdio |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.