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\nThere are n persons located on a...
[{"type": "stdin_stdout", "input": "2\n2\n1000000000 1000000000 -1000000000 -1685444969\n-1000000000 -1073004450 1000010100 1000100000\n2\n1100000000 1000000000 -1000000000 -1742607922\n-1854126016 -1929941902 1000000000 1000000000\n", "output": "0\n0\n"}, {"type": "stdin_stdout", "input": "2\n2\n1000000000 1000000000 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are storing an integer array...
[{"type": "stdin_stdout", "input": "7 7\n819259078 205583658 361196257 308947393 279447438 979945924 723265333\n819259078 205583658 747427404 308947393 24523132 349917646 723265333\n819259078 538483784 747427404 308947393 24523132 979945924 723265333\n819259078 484729909 747427404 482521039 24523132 979945924 723265333...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 easy version of the ...
[{"type": "stdin_stdout", "input": "23 1000000000\n", "output": "181477629\n"}, {"type": "stdin_stdout", "input": "24 1000000000\n", "output": "751045235\n"}, {"type": "stdin_stdout", "input": "39 1000000000\n", "output": "289091346\n"}, {"type": "stdin_stdout", "input": "10 802030518\n", "output": "754910371\n"}, {"ty...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nn fish, numbered from 1 to n, li...
[{"type": "stdin_stdout", "input": "8\n0.000 0.147 0.783 0.224 0.220 0.651 0.453 0.209\n0.853 0.000 0.246 0.076 0.018 0.349 0.896 0.315\n0.217 0.754 0.000 0.307 0.968 0.400 0.531 0.086\n0.776 0.924 0.693 0.000 0.707 0.842 0.116 0.949\n0.780 0.982 0.032 0.293 0.000 0.908 0.307 0.266\n0.349 0.651 0.600 0.158 0.092 0.000 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 used to be an accountant b...
[{"type": "stdin_stdout", "input": "56\npair pair pair int int pair pair pair pair pair int pair int int pair pair int pair pair pair int pair int int pair int pair int pair pair pair pair int pair pair int int pair int int pair int int int int int pair pair pair pair pair pair pair pair pair int pair pair int pair pai...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nFurik and Rubik love playing com...
[{"type": "stdin_stdout", "input": "20\n2 2 3 2 3 1 1 3 1 1 1 1 1 3 2 1 3 1 1 1\n1 7\n13 7 1 11 4 6 16 20 12 5 18 19 15 10\n8 7 1 11 4 6 17 8 16\n3 7 1 11\n9 7 1 11 4 6 8 20 12 3\n4 7 1 11 4\n0\n6 7 1 11 4 6 17\n4 7 1 11 4\n7 7 1 11 4 6 17 5\n2 7 1\n9 7 1 11 4 6 17 8 14 20\n11 7 1 11 4 6 20 3 5 15 10 2\n5 7 1 11 4 6\n9...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nOne day, liouzhou_101 got a chat...
[{"type": "stdin_stdout", "input": "10\nmiao.vyscfysAtWcPkpFHdwZqAQ,UPPcjhKQTlala.\nmiao.KESqus DybUuYFoWVpo..LWZh.UqEdUsTHFlKfzqkThAUPklala.\nUNoE vfZIAdxkiWKhsHPfsqRPTNQoHgAxooVLYxRzugHjo jaEHWQFF\nCCmdIwr.UkoiYWK.Z,,ZesMpISTXNgnpYnJaWquCyL,gO\n.JvOayhXK_bgoYbfAtnXg\nbvdSzRrXoGxVgWvdXnsjEnEfxDzIQo_aZVGDGrzwuAMtzVAHio...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nGerald plays the following game....
[{"type": "stdin_stdout", "input": "14 5\n4 2\n5 4\n3 3\n2 3\n1 2\n", "output": "17\n"}, {"type": "stdin_stdout", "input": "14 5\n4 2\n3 8\n3 3\n2 3\n1 2\n", "output": "18\n"}, {"type": "stdin_stdout", "input": "14 5\n4 2\n5 4\n3 3\n2 3\n1 1\n", "output": "17\n"}, {"type": "stdin_stdout", "input": "14 5\n4 2\n9 4\n3 3\...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSereja has a bracket sequence s1...
[{"type": "stdin_stdout", "input": "(()((((()(())((((((((()((((((()((((\n71\n15 29\n17 18\n5 26\n7 10\n16 31\n26 35\n2 30\n16 24\n2 24\n7 12\n15 18\n12 13\n25 30\n1 30\n12 13\n16 20\n6 35\n20 28\n18 23\n9 31\n12 35\n14 17\n8 16\n3 10\n12 33\n7 19\n2 33\n7 17\n21 27\n10 30\n29 32\n9 28\n18 32\n28 31\n31 33\n4 26\n15 27\...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSereja is a coder and he likes t...
[{"type": "stdin_stdout", "input": "1122 54\n2 1031\n1 363 364\n1 14 15\n1 902 903\n1 1052 1053\n2 170\n2 36\n2 194\n1 340 341\n1 1018 1019\n1 670 671\n1 558 559\n2 431\n2 351\n2 201\n1 1104 1105\n2 1056\n2 823\n1 274 275\n2 980\n1 542 543\n1 807 808\n2 157\n2 895\n1 505 506\n2 658\n1 484 485\n1 533 534\n1 384 385\n2 7...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nVasya is sitting on an extremely...
[{"type": "stdin_stdout", "input": "200 100\n56988719755815575893282254081467698462485803782142631369385180999746639622554559884281193367342283559238834106917388166048020056852911293394377949964185368886333934084399980368238188117302968424219707\n", "output": "295455656\n"}, {"type": "stdin_stdout", "input": "200 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\nMike and some bears are playing ...
[{"type": "stdin_stdout", "input": "5 5 30\n0 1 1 1 0\n1 1 0 1 1\n0 1 1 1 1\n0 0 1 1 0\n0 0 0 0 0\n3 2\n2 2\n2 2\n4 3\n1 4\n3 2\n4 1\n2 4\n1 4\n2 1\n5 2\n4 1\n4 1\n5 1\n2 4\n2 4\n4 4\n1 2\n3 1\n4 5\n1 2\n2 3\n1 1\n5 1\n3 4\n1 1\n5 4\n1 5\n5 4\n2 2\n", "output": "3\n3\n3\n3\n3\n4\n4\n4\n4\n4\n4\n4\n4\n4\n4\n4\n4\n4\n5\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\nLimak is a little bear who loves...
[{"type": "stdin_stdout", "input": "170\n1 2 1 2 1 1 1 1 2 3 2 1 1 2 2 1 2 1 2 1 1 2 3 3 2 1 1 1 1 1 1 1 1 2 1 2 3 3 2 1 2 2 1 2 3 2 1 1 2 3 2 1 2 1 1 1 2 3 3 2 1 2 1 2 1 1 1 2 1 2 1 1 2 2 1 1 2 1 2 2 1 2 1 2 2 1 2 1 2 3 2 1 1 2 3 4 4 3 2 1 2 1 2 1 2 3 3 2 1 2 1 1 1 1 1 1 1 2 2 1 1 2 1 1 1 1 2 1 1 2 3 2 1 2 2 1 2 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\nWilbur the pig is tinkering with...
[{"type": "stdin_stdout", "input": "22\n1000000000 -1000000000 1000000000 -1000000000 1000000000 -1000000000 1000000000 -1000000000 1000000000 -1000000000 1000000000 -1000000000 1000000000 -1000000000 1000000000 -1000000000 1000000000 -1000000000 1000000000 -1000000000 1000000000 -1000000000\n", "output": "43000000000\...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 three points marked on...
[{"type": "stdin_stdout", "input": "1000000000 -1000000000\n1000000000 1000000000\n-1000000000 -1000000000\n", "output": "2\n"}, {"type": "stdin_stdout", "input": "1000000000 -1000000000\n1000000000 1000000010\n-1000000000 -1000000000\n", "output": "2\n"}, {"type": "stdin_stdout", "input": "-636111887 -755135651\n-4114...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 main street of Berland is a ...
[{"type": "stdin_stdout", "input": "100000 99999\n", "output": "50000"}, {"type": "stdin_stdout", "input": "100000 23457\n", "output": "11729"}, {"type": "stdin_stdout", "input": "100000 23458\n", "output": "38272"}, {"type": "stdin_stdout", "input": "92388 40801\n", "output": "20401\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\nThere are n integers b1, b2, ......
[{"type": "stdin_stdout", "input": "10\n-38980 0001000000 -1000000000 1000000000 -1000000000 1000010010 -1000000000 1010000010 -1556535198 1000000000\n", "output": "961020 -999000000 0 0 10010 10010 10000010 -546535188 -556535198 1000000000\n"}, {"type": "stdin_stdout", "input": "10\n-38980 0001000000 -1000000000 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\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\nVasya came up with his own weath...
[{"type": "stdin_stdout", "input": "100\n-85 -80 -76 -72 -68 -64 -60 -56 -52 -48 -44 -40 -36 -32 -28 -24 -20 -16 -12 -8 -4 0 4 8 12 16 20 24 28 32 36 40 44 48 52 56 60 64 68 72 76 80 84 88 92 96 100 104 108 112 116 120 124 128 132 136 140 144 148 152 156 160 164 168 172 176 180 184 188 192 196 200 204 208 212 216 220 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\nAfter the Search Ultimate progra...
[{"type": "stdin_stdout", "input": "254\n", "output": "5\nlea ebx, [2*eax]\nlea ecx, [eax + 2*eax]\nlea edx, [eax + 2*ecx]\nlea eex, [edx + 8*edx]\nlea efx, [ebx + 4*eex]"}, {"type": "stdin_stdout", "input": "238\n", "output": "4\nlea ebx, [eax + 4*eax]\nlea ecx, [eax + 1*ebx]\nlea edx, [ebx + 4*ecx]\nlea eex, [ecx + 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\nThese days Arkady works as an ai...
[{"type": "stdin_stdout", "input": "66 20\n0 16\n0 45\n0 58\n1 6\n1 19\n2 7\n2 9\n3 9\n3 25\n3 57\n4 38\n4 58\n5 21\n5 40\n6 16\n6 19\n6 58\n7 6\n7 26\n7 51\n8 13\n8 36\n8 55\n9 1\n9 15\n9 33\n10 12\n10 37\n11 15\n11 34\n12 8\n12 37\n12 55\n13 26\n14 0\n14 34\n14 36\n14 48\n15 23\n15 29\n15 43\n16 8\n16 41\n16 45\n17 5...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given 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\nMoving ahead, Gudi now enters a ...
[{"type": "stdin_stdout", "input": "10\n9 8 343\n11 10 4 15 10 9 13 15\n12 13 9 18 3 3 18 17\n16 15 6 2 14 14 3 15\n4 14 14 3 17 8 3 16\n19 12 4 11 11 9 8 3\n19 3 13 17 3 17 5 15\n9 5 3 12 15 6 12 7\n13 15 2 17 4 13 6 15\n8 8 10 6 18 3 3 14\n18 12 343\n6 14 4 16 3 10 5 18 3 6 19 11\n14 11 18 8 13 5 9 3 13 15 8 6\n4 19 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLittle Shino loves to play with ...
[{"type": "stdin_stdout", "input": "18\nabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrst...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSuresh is a strange boy. He neit...
[{"type": "stdin_stdout", "input": "65\n40\n476855 9157812 15278 6467817 130592 3732511 3500060 1577432 3746144 1473833 1162927 491769 8971510 9511983 3090464 2222773 7900479 9437122 3038224 9263310 4890964 6753736 5016606 9875001 5001777 4538627 5859406 9622719 7344989 8262871 5667311 7821844 9937036 5682589 4289661 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\nAn uppercase or lowercase Englis...
[{"type": "stdin_stdout", "input": "b", "output": "a\n"}, {"type": "stdin_stdout", "input": "C", "output": "A\n"}, {"type": "stdin_stdout", "input": "`", "output": "a\n"}, {"type": "stdin_stdout", "input": "D", "output": "A\n"}, {"type": "stdin_stdout", "input": "c", "output": "a\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 will host a rock-paper-scisso...
[{"type": "stdin_stdout", "input": "6\n0\n11\n111\n1111\n11001", "output": "3"}, {"type": "stdin_stdout", "input": "6\n0\n11\n110\n1111\n11001", "output": "2"}, {"type": "stdin_stdout", "input": "6\n0\n11\n100\n0101\n11001", "output": "1"}, {"type": "stdin_stdout", "input": "6\n0\n11\n011\n1111\n11001", "output": "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\nThere are N dishes, numbered 1, ...
[{"type": "stdin_stdout", "input": "10\n1 3 2 3 3 2 3 2 1 3", "output": "54.48064457488221"}, {"type": "stdin_stdout", "input": "10\n1 3 2 2 3 2 3 2 1 3", "output": "52.8643923040\n"}, {"type": "stdin_stdout", "input": "10\n1 3 3 3 3 2 3 2 1 3", "output": "55.9466970748\n"}, {"type": "stdin_stdout", "input": "10\n1 3 1...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given integers N, K, and...
[{"type": "stdin_stdout", "input": "9954 310 12\n267 193 278 294 6 63 86 166 157 193 168 43", "output": "979180369"}, {"type": "stdin_stdout", "input": "25000 400 4\n3 7 31 127", "output": "923966268"}, {"type": "stdin_stdout", "input": "24477 400 4\n3 7 31 127", "output": "187656138"}, {"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\nThe commonly used bills in Japan...
[{"type": "stdin_stdout", "input": "2000 25743705", "output": "-1 -1 -1\n"}, {"type": "stdin_stdout", "input": "2000 40151179", "output": "-1 -1 -1\n"}, {"type": "stdin_stdout", "input": "1000 1234000", "output": "14 27 959"}, {"type": "stdin_stdout", "input": "2000 20000000", "output": "2000 0 0"}, {"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\nWe have N clocks. The hand of th...
[{"type": "stdin_stdout", "input": "5\n1\n23\n3\n1101000001000001010\n1100000100011001001", "output": "27855302557878606201578346278553253230\n"}, {"type": "stdin_stdout", "input": "5\n1\n5\n10\n1101000001000001001\n1100000000000011100", "output": "1211100001100013322200011100011111100\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\nMountaineers Mr. Takahashi and M...
[{"type": "stdin_stdout", "input": "10\n1 3776 3776 8848 8848 8848 8848 8848 8848 8848\n8848 8848 8848 8848 8848 8848 8848 8848 3776 5", "output": "884111967"}, {"type": "stdin_stdout", "input": "5\n16 0 4 -1 2\n19 24 -3 0 -11", "output": "0\n"}, {"type": "stdin_stdout", "input": "5\n16 0 1 -1 2\n19 24 -3 0 -11", "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\nWhen you enter 8 numbers from 0 ...
[{"type": "stdin_stdout", "input": "2\n65539010\n102034250", "output": "96417531\n543098655\n"}, {"type": "stdin_stdout", "input": "2\n124008976\n66277190", "output": "986395311\n96499431\n"}, {"type": "stdin_stdout", "input": "2\n188122632\n66277190", "output": "774098523\n96499431\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\nTaro is addicted to a novel. The...
[{"type": "stdin_stdout", "input": "3 9\n1051\n300\n800\n200\n100\n600\n900\n1032\n400\n4 3\n1000\n1000\n1000\n0 0", "output": "2151\n1000\n"}, {"type": "stdin_stdout", "input": "3 9\n1051\n300\n800\n200\n100\n600\n900\n1032\n400\n4 3\n1000\n1000\n1001\n0 0", "output": "2151\n1001\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\nVillages were scattered in the W...
[{"type": "stdin_stdout", "input": "7 6\n-1 2\n3 0\n2 2\n1 -1\n4 1\n2 3\n3 5\n1 3\n2 4\n2 3\n3 5\n3 7\n6 7", "output": "20.8510743960\n"}, {"type": "stdin_stdout", "input": "7 6\n-1 2\n3 0\n2 4\n1 -1\n4 1\n2 3\n3 5\n1 3\n2 4\n2 3\n3 5\n3 7\n6 7", "output": "20.0292199808\n"}, {"type": "stdin_stdout", "input": "7 6\n-1 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nModern Mansion\n\nYou got lost i...
[{"type": "stdin_stdout", "input": "0 -1 0\n5 -1", "output": "-1\n"}, {"type": "stdin_stdout", "input": "0 -1 2\n7 -1", "output": "-1\n"}, {"type": "stdin_stdout", "input": "3 1 2\n0 -1", "output": "-1\n"}, {"type": "stdin_stdout", "input": "4 0 0\n5 -1", "output": "-1\n"}, {"type": "stdin_stdout", "input": "4 0 0\n4 -...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nKarnaugh is a poor farmer who ha...
[{"type": "stdin_stdout", "input": "3\n1 1 0 1 0\n0 1 0 1 1\n1 0 1 0 1\n0 1 1 1 0\n0 1 0 0 -1\n\n0 1 0 1 1\n0 1 0 0 0\n0 0 1 0 0\n0 0 1 1 0\n1 0 1 0 0\n\n1 1 1 1 0\n0 1 1 1 0\n0 1 1 0 1\n-1 1 1 1 -1\n0 0 0 0 1", "output": "3\n3\n8\n"}, {"type": "stdin_stdout", "input": "3\n1 1 0 1 0\n0 1 0 1 1\n1 0 1 0 1\n0 1 1 1 0\n0 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nDigits Are Not Just Characters\n...
[{"type": "stdin_stdout", "input": "2\nfile10\nfi2el0\nfile3", "output": "-\n-\n"}, {"type": "stdin_stdout", "input": "2\nfjle10\nfi2el0\niele3", "output": "-\n+\n"}, {"type": "stdin_stdout", "input": "2\n01eljf\nfi2el0\niele3", "output": "+\n+\n"}, {"type": "stdin_stdout", "input": "2\nflje10\nif3el0\n2elei", "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\nYAML (YAML Ain't Markup Language...
[{"type": "stdin_stdout", "input": ".tweets.1\nname: shimeki\nid: shimejitan\ntweets:\n 1: shimejilove\n 2: azupero", "output": "string \"shimejilove\"\n"}, {"type": "stdin_stdout", "input": ".tweets.1\nname: shimeji\nid: shimejitan\ntweets:\n 1: shivejilome\n :2 azupero", "output": "string \"shivejilome\"\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\nProblem Statement\n\nOne day, yo...
[{"type": "stdin_stdout", "input": "((0,0)@(1,1))@((4,1)@(2,5))\n((0,0)@(3,1))@((1,-3)@(2,-1))\n(0,0)@(1,1)@(4,1)\n(0,0)@((1,1)@(4,1))\n(((0,0)@((10,20)@(((30,40))))))\n((0,0)@(3,1))@((1,-3)@(2,-1))@(100,-100)@(100,100)\n#", "output": "3.00000000 3.00000000\n3.00000000 1.00000000\n1.00000000 4.00000000\n0.00000000 2.00...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nProblem statement\n\nN first-yea...
[{"type": "stdin_stdout", "input": "89 111", "output": "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 11...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nCounting sort can be used for so...
[{"type": "stdin_stdout", "input": "7\n4 11 2 3 4 3 1", "output": "1 2 3 3 4 4 11\n"}, {"type": "stdin_stdout", "input": "7\n8 9 2 0 12 3 3", "output": "0 2 3 3 8 9 12\n"}, {"type": "stdin_stdout", "input": "7\n10 9 3 0 6 3 3", "output": "0 3 3 3 6 9 10\n"}, {"type": "stdin_stdout", "input": "7\n6 5 3 0 12 3 3", "outpu...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nTransformation\n\n\n\n\nWrite a ...
[{"type": "stdin_stdout", "input": "abcde\n3\nreplace 1 0 xy{\nreverse 0 2\nprint 1 6", "output": "xa{bcd\n"}, {"type": "stdin_stdout", "input": "abcde\n3\nreplace 1 0 xy{\nreverse 0 1\nprint 1 6", "output": "ay{bcd\n"}, {"type": "stdin_stdout", "input": "abcde\n3\nreplace 1 3 xyz\nreverse 0 2\nprint 0 4", "output": "y...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 an interactive problem.\...
[{"type": "stdin_stdout", "input": "1000000000 30 1000000000\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\n", "output": "1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n500000000\n750000000\n875000000\n937500000\n968750000\n984375000\n992187500\n996093750\n99804...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 segments on a Ca...
[{"type": "stdin_stdout", "input": "10\n841746 527518 -841746 -527518\n595261 331297 -595261 -331297\n-946901 129987 946901 -129987\n670374 -140388 -670374 140388\n-684770 309555 684770 -309555\n-302589 415564 302589 -415564\n-387435 613331 387435 -613331\n-624940 -95922 624940 95922\n945847 -199224 -945847 199224\n246...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 forest that we model ...
[{"type": "stdin_stdout", "input": "20\n7571542 9868879\n3634934 5986987\n2297651 5538795\n9701582 8250721\n-2913168 4968483\n8838674 5771883\n-3348778 8326335\n-577797 750161\n-7223138 9113512\n-1808146 6044926\n-756446 417388\n4700417 1550148\n-5568937 20029\n-9170707 6103893\n7445655 7161843\n8820510 4145867\n-44669...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nBilly investigates the question ...
[{"type": "stdin_stdout", "input": "91\n4000000 3000000 2900000 2511334 2511333 2102003 1901011 1700000 1200000 999999 800000 750000 600000 508111 202000 101000 35000 20000 9000 5000 2000 899 630 629 628 627 626 625 624 623 622 621 620 619 618 617 616 615 614 613 612 611 610 609 608 607 606 605 604 603 602 601 504 405 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAt the first holiday in spring, ...
[{"type": "stdin_stdout", "input": "100 15 6 10\n12 9 1 7 6 4 1 9 3 2 4 6 2 5 3 8 9 2 9 1 6 5 6 2 3 10 7 10 7 4 5 4 4 4 4 7 1 10 8 4 8 3 10 10 7 4 4 10 6 1 8 5 4 6 2 4 10 3 2 5 7 5 6 10 10 3 4 5 4 3 3 1 7 8 10 10 10 10 8 3 7 4 2 1 8 6 5 6 5 8 7 9 2 1 9 2 4 6 10 8\n6 9 7 8 7 1 4 5 5 8\n", "output": "9\n18 19 23 24 25 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\nA company has n employees number...
[{"type": "stdin_stdout", "input": "77\n53\n-1\n48\n-1\n51\n-1\n54\n43\n70\n19\n64\n31\n45\n58\n6\n61\n41\n56\n34\n-1\n54\n-1\n66\n65\n74\n16\n38\n1\n2\n61\n-1\n34\n-1\n-1\n7\n19\n57\n13\n61\n42\n-1\n34\n65\n16\n31\n61\n6\n5\n34\n15\n-1\n13\n4\n22\n74\n7\n-1\n70\n38\n61\n45\n53\n46\n22\n-1\n65\n34\n19\n43\n48\n33\n58\n...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given a prime number p, ...
[{"type": "stdin_stdout", "input": "7 7 3\n4 0 5 3 1 2 6\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "6 7 2\n1 2 3 4 5 6\n", "output": "3\n"}, {"type": "stdin_stdout", "input": "5 5 3\n3 0 4 1 2\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "2 54 10\n57 10\n", "output": "0\n"}, {"type": "stdin_std...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are responsible for installi...
[{"type": "stdin_stdout", "input": "4\n8 2 5\n00110010\n8 1 1\n00110010\n9 100000000 100000000\n010101010\n2 5 1\n00\n", "output": "94\n25\n2900000000\n13\n"}, {"type": "stdin_stdout", "input": "4\n8 2 5\n00110010\n8 1 1\n01110010\n9 100000000 100000000\n010101010\n2 5 1\n00\n", "output": "94\n26\n2900000000\n13\n"}, {...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given n positive integer...
[{"type": "stdin_stdout", "input": "100 3\n94 94 149 27 80 73 61 38 34 139 72 96 59 36 113 15 83 78 39 22 21 57 54 20 9 32 81 64 55 90 67 41 18 57 93 76 44 62 77 66 31 70 39 73 81 57 43 31 20 104 62 26 44 26 23 23 66 53 3 14 10 170 53 19 43 81 98 12 91 15 122 90 89 86 58 30 67 73 46 69 68 47 30 7 89 35 17 93 45 6 4 23 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given a tree, which cons...
[{"type": "stdin_stdout", "input": "14 2\n3 2 3 1 2 3 6 2 3 1 4 2 1 3\n12 10\n2 7\n13 12\n14 11\n10 5\n1 2\n11 4\n4 9\n14 8\n12 4\n7 14\n13 6\n10 3\n", "output": "15\n"}, {"type": "stdin_stdout", "input": "14 2\n3 2 3 1 2 3 4 2 3 1 4 2 1 3\n12 10\n2 7\n13 12\n14 11\n10 5\n1 2\n11 4\n4 9\n14 8\n12 4\n7 9\n13 6\n10 3\n",...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nEugene likes working with arrays...
[{"type": "stdin_stdout", "input": "3\n41 -41 41\n", "output": "3\n"}, {"type": "stdin_stdout", "input": "3\n41 -60 41\n", "output": "6\n"}, {"type": "stdin_stdout", "input": "3\n57 -60 41\n", "output": "6\n"}, {"type": "stdin_stdout", "input": "3\n57 -33 41\n", "output": "6\n"}, {"type": "stdin_stdout", "input": "3\n5...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are playing one famous sandb...
[{"type": "stdin_stdout", "input": "1\n8 6\n1 2 3 4 5 6\n7 8 9 10 11 12\n13 14 15 16 17 18\n19 20 21 22 23 24\n26 27 28 29 30 31\n33 34 35 36 34 35\n37 38 39 40 41 42\n44 45 46 47 48 49\n", "output": " 141\n"}, {"type": "stdin_stdout", "input": "5\n3 4\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\nLet f(x) be the sum of digits of...
[{"type": "stdin_stdout", "input": "7\n1 0\n2 1\n42 7\n1 9\n64 0\n99 0\n99 2\n", "output": "1\n-1\n4\n-1\n19999999\n99999999999\n7997\n"}, {"type": "stdin_stdout", "input": "7\n1 0\n1 1\n42 7\n1 9\n64 0\n99 0\n99 2\n", "output": "1\n0\n4\n-1\n19999999\n99999999999\n7997\n"}, {"type": "stdin_stdout", "input": "7\n1 0\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\nFor god's sake, you're boxes wit...
[{"type": "stdin_stdout", "input": "5\n2\n1 1\n2\n1 1000000000\n2\n1000000000 1\n2\n1000000000 1000000000\n2\n228 1337\n", "output": "YES\nYES\nNO\nYES\nYES\n"}, {"type": "stdin_stdout", "input": "5\n2\n1 1\n2\n1 1000000000\n2\n1000000000 1\n2\n1000000000 1010000000\n2\n228 1337\n", "output": "YES\nYES\nNO\nYES\nYES\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\nDuring her tantrums the princess...
[{"type": "stdin_stdout", "input": "1 68\n100 26 58 15 8 69 66 49 97 18 74 27 39 19 76 37 25 4 88 75 17 79 41 21 44 39 7 42 63 82 92 87 41 85 25 30 43 80 165 106 98 88 16 15 97 74 81 76 33 19 64 3 14 72 17 36 33 21 34 59 38 75 48 1 57 20 81 56 74 67 14 89 51 30 1 66 20 58 64 58 16 99 33 97 31 5 54 87 6 64 70 40 93 25 5...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given a string s consist...
[{"type": "stdin_stdout", "input": "9\n4 4\n0????1?0\n3 3\n??????\n1 0\n?\n2 2\n1001\n2 2\n01?0\n0 1\n0\n0 3\n?11\n2 2\n?00?\n4 3\n??010?0\n", "output": "00111100\n-1\n0\n1001\n0110\n-1\n111\n1001\n0101010\n"}, {"type": "stdin_stdout", "input": "9\n4 4\n0?????10\n3 3\n??????\n1 0\n?\n2 2\n0110\n2 2\n01?0\n0 1\n0\n0 3\n...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe Berland road network consist...
[{"type": "stdin_stdout", "input": "34 53\n9 6\n25 28\n27 24\n15 18\n34 33\n27 30\n1 4\n4 7\n11 9\n11 8\n30 26\n15 12\n26 23\n17 15\n29 26\n11 15\n7 10\n14 12\n5 9\n8 5\n2 1\n24 21\n3 5\n14 17\n23 20\n25 22\n32 29\n8 6\n3 6\n33 31\n5 2\n21 18\n16 19\n19 22\n17 21\n14 11\n23 27\n3 1\n34 32\n32 30\n26 24\n17 20\n18 20\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\nYet another Armageddon is coming...
[{"type": "stdin_stdout", "input": "1000000000000000000\n", "output": "113502443819651915\n"}, {"type": "stdin_stdout", "input": "999999899799299198\n", "output": "113502432686240713\n"}, {"type": "stdin_stdout", "input": "999999999999999998\n", "output": "113502443819651913\n"}, {"type": "stdin_stdout", "input": "9999...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 has array a, consisting o...
[{"type": "stdin_stdout", "input": "43\n761 2165 6131 8874 8980 119 8300 9006 6278 7582 4740 6321 10042 6869 3788 17625 1707 5070 3809 335 2494 8255 1123 1430 190 5712 7313 3286 15423 133 1032 3067 8043 5297 5398 12168 13897 2141 1436 10227 362 8438 2300\n0111011100100011110010011110011011010001101\n", "output": "23536...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 is going to make a game of...
[{"type": "stdin_stdout", "input": "20\n30 35 55\n58 58 58\n40 40 40\n8 20 37\n46 47 48\n36 50 51\n32 47 55\n13 13 14\n48 49 57\n7 22 23\n42 46 51\n6 8 46\n37 38 45\n57 58 58\n19 32 45\n46 50 56\n26 40 43\n9 50 55\n21 34 52\n40 49 57\n", "output": "6\n6 7 11 16 18 20 \n"}, {"type": "stdin_stdout", "input": "20\n12 16 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\nC*++ language is quite similar t...
[{"type": "stdin_stdout", "input": "399\n469*++a-935*++a-838*++a-468*++a+79*++a-89*++a-863*++a+531*a++-523*a++-583*++a-411*++a+301*++a+201*a++-108*a+++581*a+++938*++a-16*a++-632*a+++146*a++-230*++a+151*++a-618*a+++593*a+++320*++a+750*++a+185*a++-68*++a+839*a++-853*a+++761*a++-442*a++-385*a++-487*a++-573*a++-820*a++-123...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 administration of the Tomsk ...
[{"type": "stdin_stdout", "input": "30 505231\n-18 16 88130\n-10 16 15693\n16 -32 660\n-27 17 19042\n30 -37 6680\n36 19 299674\n-45 21 3300\n11 27 76\n-49 -34 28649\n-1 11 31401\n25 42 20858\n-40 6 455660\n-29 43 105001\n-38 10 6042\n19 -45 65551\n20 -9 148533\n-5 -24 393442\n-43 2 8577\n-39 18 97059\n12 28 39189\n35 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\nBizon the Champion isn't just fr...
[{"type": "stdin_stdout", "input": "571312007450 10\n", "output": " 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\nToday you are to solve the probl...
[{"type": "stdin_stdout", "input": "10 20 10\n1 10\n5 10\n2 9\n2 6\n9 6\n3 9\n7 1\n10 5\n7 8\n8 7\n2 4\n9 6\n1 6\n5 3\n4 3\n3 7\n8 2\n6 4\n2 3\n4 1\nTjOMmYPRUY 7 3 1 3 9\nj 6 2 11 15\nBanBSrUA 4 2 19 20\ncSWZxzR 8 1 8\nzVoRlNgt 10 2 6 7\nWLGaq 1 3 10 13 17\nKahHtTDj 1 2 2 14\nrUFZmkpI 6 1 16\ni 4 3 4 5 12\nKLGiua 6 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\nVasya has become interested in w...
[{"type": "stdin_stdout", "input": "131\n1\n-1\n1\n-1\n1\n-1\n1\n-1\n1\n-1\n1\n-1\n0\n-1\n1\n-1\n1\n-1\n1\n-1\n1\n-1\n1\n-1\n1\n-1\n1\n-1\n1\n-1\n1\n-1\n1\n-1\n1\n-1\n1\n-1\n1\n-1\n1\n-1\n1\n-1\n1\n-1\n1\n-1\n1\n-1\n1\n-1\n1\n-1\n1\n-1\n1\n-1\n1\n-1\n1\n-1\n1\n-1\n1\n-1\n1\n-1\n1\n-1\n1\n-1\n1\n-1\n1\n-1\n1\n-1\n1\n-1\...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nVitaly is a diligent student who...
[{"type": "stdin_stdout", "input": "yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyzyyyyyyyyyyyyyyyyyyyyyy\nzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\n", "output": "yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given a string q. A sequ...
[{"type": "stdin_stdout", "input": "26\nlllplzkkzflzflffzznnnnfgflqlttlmtnkzlztskngyymitqagattkdllyutzimsrskpapcmuupjdopxqlnhqcscwvdtxbflefy\n", "output": "YES\nlll\npl\nz\nkkz\nflzflffzz\nnnnnf\ngfl\nql\nttl\nmtnkzlzt\nskng\nyym\nitq\nagattk\ndlly\nutzims\nrskpap\ncmuup\njd\nop\nxqln\nhqcsc\nw\nvdtx\nbfl\nefy\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\nDaniel has a string s, consistin...
[{"type": "stdin_stdout", "input": "2 7\nab\n1 w\n2 w\n1 c\n2 .\n2 .\n1 .\n2 b\n", "output": "0\n0\n0\n0\n0\n1\n0\n"}, {"type": "stdin_stdout", "input": "2 7\nab\n2 w\n2 w\n1 c\n2 .\n2 .\n1 .\n2 b\n", "output": "0\n0\n0\n0\n0\n1\n0\n"}, {"type": "stdin_stdout", "input": "2 7\nab\n2 w\n2 w\n1 c\n2 /\n2 .\n1 .\n2 b\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\nGalois is one of the strongest c...
[{"type": "stdin_stdout", "input": "........\n........\n.B....B.\n....W...\n........\n..W.....\n........\n........\n", "output": "A\n"}, {"type": "stdin_stdout", "input": "..B.....\n..W.....\n......B.\n........\n.....W..\n......B.\n........\n........\n", "output": "B\n"}, {"type": "stdin_stdout", "input": "........\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\nMeanwhile, the kingdom of K is g...
[{"type": "stdin_stdout", "input": "30\n1 2\n1 3\n1 4\n4 5\n2 6\n2 7\n4 8\n4 9\n6 10\n6 11\n11 30\n11 23\n30 24\n30 29\n25 26\n25 27\n27 29\n27 28\n23 20\n23 22\n20 21\n20 19\n3 12\n3 13\n13 14\n13 15\n15 16\n15 17\n15 18\n2\n6 17 25 20 5 9 13\n10 2 4 3 14 16 18 22 29 30 19\n", "output": "3\n-1\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\nYash has recently learnt about t...
[{"type": "stdin_stdout", "input": "11\n-9 -1 -10 9 7 -4 0 -13 -3 3 5\n", "output": "4\n"}, {"type": "stdin_stdout", "input": "11\n-9 -1 -10 9 7 -4 0 -13 -2 3 5\n", "output": "5\n"}, {"type": "stdin_stdout", "input": "11\n-9 -1 -2 9 7 -4 -1 -13 -3 3 5\n", "output": "5\n"}, {"type": "stdin_stdout", "input": "11\n-9 -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\nKolya is going to make fresh ora...
[{"type": "stdin_stdout", "input": "100 1000 1083\n992 616 818 359 609 783 263 989 501 929 362 394 919 1081 870 830 1097 975 62 346 531 367 323 457 707 360 949 334 867 116 478 417 961 963 1029 114 867 1008 988 916 983 1077 959 1322 572 961 579 318 721 337 488 717 111 70 416 685 987 130 353 107 61 191 827 849 106 815 21...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSanta Claus has n candies, he dr...
[{"type": "stdin_stdout", "input": "1000\n", "output": "44\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 54 "}, {"type": "stdin_stdout", "input": "999\n", "output": "44\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 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nArkadiy has lots square photos w...
[{"type": "stdin_stdout", "input": "469568633 681052815 681052815\n", "output": "105742091.0000000000\n"}, {"type": "stdin_stdout", "input": "452081307 790635695 790635695\n", "output": "169277194.0000000000\n"}, {"type": "stdin_stdout", "input": "338084774 564168943 564168943\n", "output": "113042084.5000000000\n"}, {...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nPolycarp is very careful. He eve...
[{"type": "stdin_stdout", "input": ",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\n", "output": ", , , , , , ,...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe capital of Berland looks lik...
[{"type": "stdin_stdout", "input": "1000000000 1010000000 10\n668983398 843926244\n730038846 389721428\n400508549 779159281\n683648123 559948749\n105869012 181419826\n391396726 503295408\n248489591 686114055\n102102370 108241714\n610800354 28286278\n587730768 379340837\n", "output": "331016602\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\nHands that shed innocent blood!\...
[{"type": "stdin_stdout", "input": "11\n1 0 0 1 1 3 2 0 0 2 3\n", "output": "4\n"}, {"type": "stdin_stdout", "input": "11\n1 0 0 1 0 3 2 0 0 2 3\n", "output": "4\n"}, {"type": "stdin_stdout", "input": "11\n1 0 0 1 0 3 2 0 0 2 2\n", "output": "4\n"}, {"type": "stdin_stdout", "input": "2\n1000000000 1000000000\n", "outpu...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nEdogawa Conan got tired of solvi...
[{"type": "stdin_stdout", "input": "10\n50096 50096 50096 50096 50096 50096 55337 50096 50096 50096\n", "output": "Conan\n"}, {"type": "stdin_stdout", "input": "10\n53335 35239 26741 28797 35239 26741 35239 35239 53335 35239\n", "output": "Conan\n"}, {"type": "stdin_stdout", "input": "10\n38282 53699 38282 69689 38282 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 consecutive seat pla...
[{"type": "stdin_stdout", "input": "64 59 2\n.*.***......****.*..**..**..****.*.*.*.**...**..***.***.*..*..*.\n", "output": "23\n"}, {"type": "stdin_stdout", "input": "64 59 3\n.*.***......****.*..**..**..****.*.*.*.**...**..***.***.*..*..*.\n", "output": "24\n"}, {"type": "stdin_stdout", "input": "64 8 3\n.*.***.........
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA very unusual citizen lives in ...
[{"type": "stdin_stdout", "input": "10000 10000 10000\n", "output": "10000.0000000000\n"}, {"type": "stdin_stdout", "input": "11000 10000 10000\n", "output": "10000.0000000000\n"}, {"type": "stdin_stdout", "input": "9999 10000 10000\n", "output": "9999.0000000000\n"}, {"type": "stdin_stdout", "input": "10000 9999 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\nRaju and Rani and playing games ...
[{"type": "stdin_stdout", "input": "6 10\n202 354 122 286 138 46\n124 266 181 2 140 246 227 153 68 346", "output": "YES\nYES\nNO\nYES\nYES\nYES\nNO\nNO\nYES\nYES\n"}, {"type": "stdin_stdout", "input": "6 10\n202 354 122 286 244 46\n16 266 181 4 203 246 227 288 68 346", "output": "YES\nYES\nNO\nYES\nNO\nYES\nNO\nYES\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\nFebruary Easy Challenge 2015 is...
[{"type": "stdin_stdout", "input": "82\n9640\n4797\n29790\n23696\n9640\n2691\n3070\n26136\n12309\n11629\n14060\n7053\n6461\n20643\n16255\n120\n28371\n16925\n5789\n29110\n19346\n23993\n25728\n808\n3619\n30858\n5818\n26028\n30529\n5747\n3959\n26956\n29467\n7669\n23043\n28598\n4602\n32326\n2188\n25324\n29731\n31651\n7976\...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nMonk has to visit a land where s...
[{"type": "stdin_stdout", "input": "1\n5\n2 1\n2 2\n3 1\n4 7\n2 10\n\nEMPMAS", "output": "4\n"}, {"type": "stdin_stdout", "input": "1\n5\n1 1\n2 2\n3 1\n4 5\n2 10\n\nSAMPME", "output": "3\n"}, {"type": "stdin_stdout", "input": "1\n5\n1 1\n2 2\n3 1\n4 5\n2 10\n\nEMPMAS", "output": "3\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\nHow many multiples of d are ther...
[{"type": "stdin_stdout", "input": "-1 110 1", "output": "112\n"}, {"type": "stdin_stdout", "input": "-1 111 1", "output": "113\n"}, {"type": "stdin_stdout", "input": "-1 101 1", "output": "103\n"}, {"type": "stdin_stdout", "input": "12 139 1", "output": "128\n"}, {"type": "stdin_stdout", "input": "12 152 1", "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\nGiven are simple undirected grap...
[{"type": "stdin_stdout", "input": "100000\n-1\n0 -1\n0\n49829 100010\n1\n2 101000", "output": "174435630"}, {"type": "stdin_stdout", "input": "100000\n0\n0 -1\n1\n49829 100010\n1\n1 100000", "output": "174435630"}, {"type": "stdin_stdout", "input": "100000\n0\n0 -1\n1\n49829 100010\n1\n1 100100", "output": "174435630"...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nRequirements\n\n* All inputs are...
[{"type": "stdin_stdout", "input": "5 7\n1 2 5\n5 3 4\n2 4 12\n1 5 1\n2 1 3\n4 5 3\n4 3 9\n12\n1\n1 1\n1\n2 6\n1\n3 4\n0", "output": "-1\n-1\n-1\n-1\n-1\n-1\n-1\n-1\n-1\n-1\n-1\n-1\n"}, {"type": "stdin_stdout", "input": "5 7\n1 2 5\n5 3 4\n4 4 12\n1 5 1\n3 2 3\n5 5 2\n4 3 8\n10\n1\n0 1\n2\n2 1\n1\n3 8\n0", "output": "-...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA sequence a=\\\\{a_1,a_2,a_3,.....
[{"type": "stdin_stdout", "input": "108", "output": "115\n"}, {"type": "stdin_stdout", "input": "107", "output": "102\n"}, {"type": "stdin_stdout", "input": "161", "output": "100\n"}, {"type": "stdin_stdout", "input": "220", "output": "116\n"}, {"type": "stdin_stdout", "input": "588", "output": "120\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\nJoisino is working as a receptio...
[{"type": "stdin_stdout", "input": "2\n151 -2\n0 4", "output": "-147\n"}, {"type": "stdin_stdout", "input": "2\n276 -2\n0 4", "output": "-272\n"}, {"type": "stdin_stdout", "input": "2\n276 -1\n0 4", "output": "-271\n"}, {"type": "stdin_stdout", "input": "2\n276 -1\n0 7", "output": "-268\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\nE869120 defined a sequence $a$ l...
[{"type": "stdin_stdout", "input": "42 102", "output": "184174004\n"}, {"type": "stdin_stdout", "input": "42 123", "output": "268300608\n"}, {"type": "stdin_stdout", "input": "46 123", "output": "960087486\n"}, {"type": "stdin_stdout", "input": "70 123", "output": "396400358\n"}, {"type": "stdin_stdout", "input": "42 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\nYour task is to write a program ...
[{"type": "stdin_stdout", "input": "5\n11\n3\n5\n8\n10\n11\n8\n29\n1\n3\n2", "output": "3\n5\n8\n11\n"}, {"type": "stdin_stdout", "input": "5\n11\n4\n10\n4\n-1\n20\n8\n20\n2\n8\n0", "output": "4\n8\n20\n"}, {"type": "stdin_stdout", "input": "5\n11\n2\n11\n1\n-2\n20\n8\n22\n2\n6\n1", "output": "1\n2\n11\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 BMI (Body Mass Index) a...
[{"type": "stdin_stdout", "input": "6\n2 165 27\n-1 317 60\n2 68 72\n11 160 75\n7 185 001\n10 182 113\n3\n3 37 105\n0 229 6\n2 204 75\n0", "output": "11\n2\n"}, {"type": "stdin_stdout", "input": "6\n2 95 27\n-1 317 60\n2 68 72\n11 160 75\n7 185 101\n10 182 113\n3\n3 37 105\n0 229 6\n1 204 75\n0", "output": "11\n1\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\nAkira, the student council presi...
[{"type": "stdin_stdout", "input": "3 2 7\n1 1 2\n1 2 3\n2 1 1\n2 3 2\n2 2 1", "output": "4\n"}, {"type": "stdin_stdout", "input": "3 2 5\n2 1 2\n1 2 3\n2 1 1\n2 3 2\n2 2 1", "output": "3\n"}, {"type": "stdin_stdout", "input": "3 2 6\n1 1 2\n1 2 3\n2 1 1\n2 3 1\n2 2 2", "output": "5\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\nAt the end of last year, Santa C...
[{"type": "stdin_stdout", "input": "12 8\n3\n-1 1\n3 4\n18 6", "output": "31\n3 4\n"}, {"type": "stdin_stdout", "input": "1 4\n3\n1 -1\n0 6\n2 -1", "output": "10\n1 -1\n"}, {"type": "stdin_stdout", "input": "12 8\n3\n-1 1\n3 4\n18 5", "output": "30\n3 4\n"}, {"type": "stdin_stdout", "input": "12 8\n3\n-1 1\n5 4\n10 5",...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAn old document says that a Ninj...
[{"type": "stdin_stdout", "input": "2\n3 3 3 3 -3 3 2 -5 3 2 -5 -3 0\n3 5 3 -2 4 -3 -2 -2 -1 0", "output": "1 2 4 6\n2 1 3 8\n3 2 4 7\n4 1 3 5\n5 4 6 7\n6 1 5\n7 3 5 8\n8 2 7\n1 2 2 3 4\n2 1 1 3 4 4\n3 1 2 4\n4 1 2 2 3\n"}, {"type": "stdin_stdout", "input": "2\n3 3 3 3 -3 3 2 -5 3 2 -5 -3 0\n3 5 4 -2 4 -1 -2 -2 -1 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\nExample\n\nInput\n\n5 3\n4\n2\n5...
[{"type": "stdin_stdout", "input": "92 1\n1\n-2\n2", "output": "1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51\n52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n6...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are a treasure hunter travel...
[{"type": "stdin_stdout", "input": "ABCABCABAB\nZZZZZZZZZZZZ\nNDD", "output": "ABAB\nZZZZZZ\nD\n"}, {"type": "stdin_stdout", "input": "ABCABCACAB\nZZZZZZZZZZZZ\nNDD", "output": "ACAB\nZZZZZZ\nD\n"}, {"type": "stdin_stdout", "input": "ABCABCABAB\nZZZZZZZZZZZZ\nNEE", "output": "ABAB\nZZZZZZ\nE\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\nA rabbit who came to the fair fo...
[{"type": "stdin_stdout", "input": "4 6 1\n......\n...Y..\n/..Z..\nYRRRYY", "output": "YES\n"}, {"type": "stdin_stdout", "input": "4 6 1\n......\n...Y..\n..Z../\nYRRRYY", "output": "YES\n"}, {"type": "stdin_stdout", "input": "4 6 1\n......\n...Y./\n/..Z..\nYRRRYY", "output": "YES\n"}, {"type": "stdin_stdout", "input": ...
code_stdio