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\nYou are given $n$ integers. You ...
[{"type": "stdin_stdout", "input": "15\n6 7 11 8 13 11 4 20 17 12 9 15 18 13 9\n", "output": "15\n3 5\n4 11 17 8 13\n13 6 11 18 9\n9 15 7 12 20\n"}, {"type": "stdin_stdout", "input": "15\n9 13 29 10 17 15 21 7 7 7 13 4 5 16 2\n", "output": "15\n3 5\n7 2 13 17 9\n10 7 4 15 21\n29 13 7 5 16\n"}, {"type": "stdin_stdout", ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere are N squares arranged in ...
[{"type": "stdin_stdout", "input": "300 299\n95 150 2\n20 24 1\n187 206 2\n137 225 3\n43 57 1\n173 234 3\n56 71 2\n1 94 2\n150 176 2\n192 212 2\n214 217 1\n188 190 1\n236 245 1\n24 41 2\n134 147 2\n196 208 2\n75 151 2\n135 135 1\n213 232 1\n159 174 2\n93 131 2\n121 132 2\n7 11 1\n108 117 1\n80 94 2\n187 226 2\n231 250 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 integers b (b \\geq 2) and n...
[{"type": "stdin_stdout", "input": "100000000000\n100000000000\n", "output": "100000000001\n"}, {"type": "stdin_stdout", "input": "100000000000\n50000000000\n", "output": "50000000001\n"}, {"type": "stdin_stdout", "input": "99999515529\n49999757765\n", "output": "49999757765\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\nThere is a string s of length 3 ...
[{"type": "stdin_stdout", "input": "fzezbxdbwzbqzxdlkqpcheqlhlfkohdekflklzxpxodqexwewpfbobcdlxowlqzxkqdobwodoxdhcohfdzhlfzbzhcobhewxzodzqfxfbokxkqexwzdfxwhwfeocxobxkocphcofwlkzkcqpblclblbecbwozldhxfdekpwxocfhbzkxqwhkofcxzqlwhpdzkdcedxwkqpqpfchfeclcxeqxfcbzfkophefxkqclxwfoxdfpbeowxpxfdwpolkczlpcdhkhkhohplbfzkolqlzfbhfzl...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe only difference between easy...
[{"type": "stdin_stdout", "input": "46 50\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\n29 22 30 33 13 31 19 11 12 21 5 4 24 21 20 6 28 16 27 18 21 11 3 24 21 8 8 33 24 7 34 12 13 32 26 33 33 22 18 2 3 7 24 17 9 30\n", "output": "265429165\n98093399\n859759619\n646262275\...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 mathematics, a subsequence is...
[{"type": "stdin_stdout", "input": "KOROXDDWEUVYWJIXSFPEJFYZJDDUXISOFJTIFJSBTWIJQHMTQWLAGGMXTFALRXYCMGZNKYQRCDVTPRQDBAALTWAXTNLDPYWNSFKE\nNHZGRZFMFQGSAYOJTFKMMUPOOQXWCPPAIVRJHINJPHXTTBWRIYNOHMJKBBGXVXYZDBVBBTQRXTOFLBBCXGNICBKAAGOKAYCCJYCW\nXCXLBESCRBNKWYGFDZFKWYNLFAKEWWGRUIAQGNCFDQXCHDBEQDSWSNGVKUFOGGSPFFZWTXGZQMMFJXDW...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA monster is attacking the Cyber...
[{"type": "stdin_stdout", "input": "100 100 100\n100 100 100\n100 100 100\n", "output": "100\n"}, {"type": "stdin_stdout", "input": "50 100 51\n100 100 100\n1 100 100\n", "output": "1384\n"}, {"type": "stdin_stdout", "input": "100 100 1\n100 100 100\n1 100 100\n", "output": "1891\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\nMad scientist Mike has just fini...
[{"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 got a new snow blower as a...
[{"type": "stdin_stdout", "input": "29 -999961 689169\n-999960 689169\n-999927 -938525\n-999735 -989464\n-993714 -997911\n-870186 -999686\n-796253 -999950\n-139940 -999968\n969552 -999972\n985446 -999398\n992690 -997295\n999706 -973137\n999898 -848630\n999997 -192297\n999969 773408\n999495 960350\n999143 981671\n998324...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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": "1000000000000000\n", "output": "18 999999993541753\n"}, {"type": "stdin_stdout", "input": "1000000000000000\n", "output": "18 999999993541753\n"}, {"type": "stdin_stdout", "input": "999999993700000\n", "output": "18 999999993541753\n"}, {"type": "stdin_stdout", "input": "385925923480...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nPetya's friends made him a birth...
[{"type": "stdin_stdout", "input": "500\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\nSIHanatsuka - EMber SIHanatsuka ...
[{"type": "stdin_stdout", "input": "60\n51 18 41 48 9 10 7 2 34 23 31 55 28 29 47 42 14 30 60 43 16 21 1 33 6 36 58 35 50 19 40 27 26 25 20 38 8 53 22 13 45 4 24 49 56 39 15 3 57 17 59 11 52 5 44 54 37 46 32 12\n", "output": "133605669\n"}, {"type": "stdin_stdout", "input": "59\n43 38 39 8 13 54 3 51 28 11 46 41 14 20 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nDuring the research on propertie...
[{"type": "stdin_stdout", "input": "30\n3 3\n2 2\n4 4\n8 8\n16 16\n32 32\n64 64\n128 128\n256 256\n512 512\n1024 1024\n2048 2048\n4096 4096\n8192 8192\n16384 16384\n32768 32768\n65536 65536\n131072 131072\n262144 262144\n524288 524288\n1048576 1048576\n2097152 2097152\n4194304 4194304\n8388608 8388608\n16777216 1677721...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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. ...
[{"type": "stdin_stdout", "input": "1000\n1 1 2 3 4 5 5 7 8 9 10 11 12 12 14 14 15 16 18 19 20 19 20 23 24 24 25 27 28 29 30 31 32 32 32 35 36 36 38 39 39 41 42 42 43 45 45 47 48 49 50 50 52 52 53 55 56 57 57 59 59 61 62 62 64 64 66 67 67 69 70 70 71 72 73 73 76 77 78 79 79 81 82 83 83 84 86 87 87 88 90 91 91 92 94 95 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn \"Takahashi-ya\", a ramen res...
[{"type": "stdin_stdout", "input": "1263 230932693\n", "output": "229248792\n"}, {"type": "stdin_stdout", "input": "2955 992093419\n", "output": "500531329\n"}, {"type": "stdin_stdout", "input": "2976 430005833\n", "output": "172511512\n"}, {"type": "stdin_stdout", "input": "2993 575559499\n", "output": "520246596\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 two integers $a$ a...
[{"type": "stdin_stdout", "input": "904132655 827386249 118827660 334\n+++-+++++--+++----+-+-+-+-+--+-+---++--++--++--+-+-+++-+++--+-+-+----+-+-++++-----+--++++------+++-+-+-++-++++++++-+-++-+++--+--++------+--+-+++--++--+---++-++-+-+-++---++-++--+-+-++-+------+-+----+++-+++--+-+-+--+--+--+------+--+---+--+-++--+++---+...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nGiven is a tree with N vertices ...
[{"type": "stdin_stdout", "input": "10104\n5741 6080\n3408 7811\n5930 5446\n2841 6030\n7143 6678\n5930 3686\n3091 5609\n9185 6802\n8673 6440\n593 5930\n4271 5808\n3292 3568\n2712 5673\n10008 5082\n421 4874\n5930 7228\n5005 6587\n2254 9793\n8397 7976\n8682 4699\n8396 5930\n7253 1069\n1980 6577\n8066 4032\n2303 3724\n370...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nNauuo is a girl who loves playin...
[{"type": "stdin_stdout", "input": "20\n15 10 6 0 0 11 19 17 0 0 0 0 0 1 14 0 3 4 0 12\n20 7 0 0 0 0 0 0 5 8 2 16 18 0 0 13 9 0 0 0\n", "output": "30"}, {"type": "stdin_stdout", "input": "20\n0 0 0 0 5 6 7 8 0 0 11 12 13 14 15 16 17 18 0 0\n20 9 19 0 0 0 0 0 0 10 0 0 0 0 0 0 1 2 3 4\n", "output": "37"}, {"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 are given two strings $s$ an...
[{"type": "stdin_stdout", "input": "5 102\neyw*y\neywsnxcwslfyiqbbeoaawtmioksfdndptxxcwzfmrpcixjbzvicijofjrbcvzaedglifuoczgjlqylddnsvsjfmfsccxbdveqguyfk\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "1 17\n*\nthisisabadproblem\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "6 10\ncode*s\ncodeforce...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAndrey needs one more problem to...
[{"type": "stdin_stdout", "input": "100\n0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nOn vacations n pupils decided to...
[{"type": "stdin_stdout", "input": "10000 1000000000 999999999 1000000000 10000\n", "output": "1.0000000000\n"}, {"type": "stdin_stdout", "input": "10000 1000000000 999999999 1000000000 3\n", "output": "1.0000000010\n"}, {"type": "stdin_stdout", "input": "10000 1000000000 999999999 1000000000 1\n", "output": "1.0000000...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nJeff got 2n real numbers a_1, a_...
[{"type": "stdin_stdout", "input": "10\n8003.867 4368.000 2243.000 3340.287 5384.000 1036.456 3506.000 4463.000 1477.000 2420.314 9391.000 1696.000 5857.833 244.000 8220.000 5879.000 5424.482 2631.197 7111.000 9157.536\n", "output": "0.028\n"}, {"type": "stdin_stdout", "input": "10\n8003.867 4368.000 2243.298 3340.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\nPolycarp takes part in a quadcop...
[{"type": "stdin_stdout", "input": "-100 -100\n-100 100\n", "output": "406\n"}, {"type": "stdin_stdout", "input": "-100 -100\n100 -100\n", "output": "406\n"}, {"type": "stdin_stdout", "input": "100 -100\n-100 -100\n", "output": "406\n"}, {"type": "stdin_stdout", "input": "-100 100\n-100 -100\n", "output": "406\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\nLet's introduce a number system ...
[{"type": "stdin_stdout", "input": "1000000000\n", "output": "48999999753\n"}, {"type": "stdin_stdout", "input": "500000000\n", "output": "24499999753\n"}, {"type": "stdin_stdout", "input": "600000000\n", "output": "29399999753\n"}, {"type": "stdin_stdout", "input": "709000900\n", "output": "34741043853\n"}, {"type": "...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA has a string consisting of som...
[{"type": "stdin_stdout", "input": "aaaaabbbbbb\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "aabbaacccc\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "bbbabacca\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "aabcbcaca\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "abababccc...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nTwilight Sparkle was playing Lud...
[{"type": "stdin_stdout", "input": "100000 100000\n", "output": "99999.418033254507\n"}, {"type": "stdin_stdout", "input": "50000 100000\n", "output": "49999.843487110789\n"}, {"type": "stdin_stdout", "input": "99999 100000\n", "output": "99998.418042461126\n"}, {"type": "stdin_stdout", "input": "51520 73331\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\nIn the snake exhibition, there a...
[{"type": "stdin_stdout", "input": "36\n2\n--\n2\n>-\n2\n<-\n2\n->\n2\n>>\n2\n<>\n2\n-<\n2\n><\n2\n<<\n3\n---\n3\n>--\n3\n<--\n3\n->-\n3\n>>-\n3\n<>-\n3\n-<-\n3\n><-\n3\n<<-\n3\n-->\n3\n>->\n3\n<->\n3\n->>\n3\n>>>\n3\n<>>\n3\n-<>\n3\n><>\n3\n<<>\n3\n--<\n3\n>-<\n3\n<-<\n3\n-><\n3\n>><\n3\n<><\n3\n-<<\n3\n><<\n3\n<<<\n"...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nMayor of city S just hates trees...
[{"type": "stdin_stdout", "input": "10\n21005 10850\n27020 13372\n28183 3724\n22874 13564\n27446 11493\n22522 10012\n24819 11529\n24166 11084\n24539 9211\n24152 9235\n", "output": "71869\n31855 31856 31857 31858 31859 31860 31861 31862 31863 31864 \n"}, {"type": "stdin_stdout", "input": "2\n1000000 1000000\n1000000 100...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWelcome to Innopolis city. Throu...
[{"type": "stdin_stdout", "input": "100\n1777 339 1249 1644 785 810 228 549 1892 464 1067 639 65 1653 981 1858 863 1980 1174 427 1710 345 309 826 31 1898 255 661 951 443 802 195 177 752 979 1842 1689 399 568 1906 129 1571 1263 696 911 810 1877 1932 1389 1128 112 619 184 434 22 1269 386 324 1635 1440 705 300 455 1635 10...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe new camp by widely-known ove...
[{"type": "stdin_stdout", "input": "01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 an n × m rectangular ...
[{"type": "stdin_stdout", "input": "21 10 8\n1 1 1 0 0 1 1 1 1 1\n1 1 1 0 0 1 1 1 1 1\n1 1 1 0 0 1 1 1 1 1\n1 1 1 0 0 1 1 1 1 1\n1 1 1 0 0 1 1 1 1 1\n0 0 1 1 1 0 0 0 0 0\n0 0 0 1 1 0 0 0 0 0\n1 1 1 0 0 1 1 1 1 1\n0 0 0 1 1 0 0 0 0 0\n1 1 1 0 0 1 1 1 1 1\n1 1 1 0 0 1 1 1 1 1\n0 0 0 1 1 0 0 0 0 0\n1 0 1 0 0 1 1 1 1 1\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\nSasha grew up and went to first ...
[{"type": "stdin_stdout", "input": "10\n0 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000\n1000000000 0 1 1 1 1 1 1 1 1\n1000000000 1 0 1 1 1 1 1 1 1\n1000000000 1 1 0 1 1 1 1 1 1\n1000000000 1 1 1 0 1 1 1 1 1\n1000000000 1 1 1 1 0 1 1 1 1\n1000000000 1 1 1 1 1 0 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\nElections in Berland are coming....
[{"type": "stdin_stdout", "input": "54\n10 13\n10 45\n10 51\n01 44\n10 24\n10 26\n10 39\n10 38\n10 41\n10 33\n10 18\n10 12\n10 38\n10 30\n11 31\n10 46\n11 50\n00 26\n00 29\n00 50\n10 16\n10 40\n10 50\n00 43\n10 48\n10 32\n10 18\n10 8\n10 24\n10 32\n10 52\n00 41\n10 37\n10 38\n10 49\n00 35\n10 52\n00 44\n10 41\n10 36\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\nSoon there will be held the worl...
[{"type": "stdin_stdout", "input": "40 50 70\n4 5 8 7 3 9 9 2 10 5 7 4 8 1 6 2 6 5 4 7 8 9 6 8 10 8 5 9 4 9 3 4 9 10 1 1 6 3 3 3 7 3 8 8 3 5 1 10 7 6\n2 5 3 4 1 1 4 6 8 9 11 4 3 10 5 6 10 7 4 11 9 1 3 7 8 9 9 2 1 11 9 9 10 10 3 6 11 7 1 8\n26 7 12 28 6 29 30 29 27 30 17 32 9 9 14 30 27 0 17 13 18 25 28 8 32 18 26 34 33...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIvan places knights on infinite ...
[{"type": "stdin_stdout", "input": "79\n", "output": "0 0\n1 0\n1 3\n2 0\n3 0\n3 3\n4 0\n5 0\n5 3\n6 0\n7 0\n7 3\n8 0\n9 0\n9 3\n10 0\n11 0\n11 3\n12 0\n13 0\n13 3\n14 0\n15 0\n15 3\n16 0\n17 0\n17 3\n18 0\n19 0\n19 3\n20 0\n21 0\n21 3\n22 0\n23 0\n23 3\n24 0\n25 0\n25 3\n26 0\n27 0\n27 3\n28 0\n29 0\n29 3\n30 0\n31 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\nIn order to put away old things ...
[{"type": "stdin_stdout", "input": "1000000000000000000 2\n", "output": "61\n0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 1 0 0 0 1 1 1 1 1 0 0 1 0 1 1 1 1 1 1 0 1 0 0 1 1 1 0 0 0 0 1 0 0 0 1 0 0 1\n"}, {"type": "stdin_stdout", "input": "1000000000000000000 3\n", "output": "39\n1 0 0 0 2 0 2 2 0 2 0 0 1 1 1 2 1 1 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\nMikhail the Freelancer dreams of...
[{"type": "stdin_stdout", "input": "10 468662 93838\n589910 727627\n279516 867207\n470524 533177\n467834 784167\n295605 512137\n104422 629804\n925609 728473\n922365 500342\n998983 958315\n425628 935048\n", "output": "0.469139114479426\n"}, {"type": "stdin_stdout", "input": "6 1000000 999999\n999999 1\n999995 999994\n99...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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\n38282 53699 38282 38282 38282 38282 38282 38282 38282 38282\n", "output": "Conan\n"}, {"type": "stdin_stdout", "input": "10\n50165 50165 50165 50165 50165 50165 50165 50165 50165 50165\n", "output": "Agasa\n"}, {"type": "stdin_stdout", "input": "10\n32093 36846 32093 32093 36846 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given two integers A and...
[{"type": "stdin_stdout", "input": "209 499\n", "output": "100 100\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\nNearly each project of the F com...
[{"type": "stdin_stdout", "input": "100 5\n- 60\n- 58\n+ 25\n- 32\n+ 86\n", "output": "95\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 26 27 28 29 30 31 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 59 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 8...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given two arrays $a$ and...
[{"type": "stdin_stdout", "input": "235 1\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nPaul hates palindromes. He assum...
[{"type": "stdin_stdout", "input": "302 4\nabdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdc...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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\"Duel!\"\n\nBetting on the love...
[{"type": "stdin_stdout", "input": "30 19\n000000000010110000101111111111\n", "output": "quailty\n"}, {"type": "stdin_stdout", "input": "20 18\n10010000011111110101\n", "output": "tokitsukaze\n"}, {"type": "stdin_stdout", "input": "20 15\n00000001010001101100\n", "output": "tokitsukaze\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\nRecently a Golden Circle of Beet...
[{"type": "stdin_stdout", "input": "98752 97209\n41218 39020\n", "output": "21427641 3199861056\n"}, {"type": "stdin_stdout", "input": "65536 32768\n6427 13573\n", "output": "67108864 1073741824\n"}, {"type": "stdin_stdout", "input": "100000 100000\n10 1\n", "output": "10000000000 10000000000\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\nSnuke has an integer sequence, a...
[{"type": "stdin_stdout", "input": "50\n-1000000 -1000000 -1000000 1 -1000000 -1000000 -1000000 -1000000 -1000000 -1000000 -1000000 -1000000 -1000000 -1000000 -1000000 -1000000 -1000000 -1000000 -1000000 -1000000 -1000000 -1000000 -1000000 -1000000 -1000000 -1000000 -1000000 -1000000 -1000000 -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\nPari wants to buy an expensive c...
[{"type": "stdin_stdout", "input": "15 388\n33 232 106 369 266 135 22 169 367 37 14 181 232 25 154\n", "output": "59\n0 14 22 25 33 37 39 47 51 58 59 62 70 72 84 135 149 157 160 168 169 172 174 181 182 183 186 191 193 194 195 197 202 205 206 207 214 216 219 220 228 231 239 253 304 316 318 326 329 330 337 341 349 351 35...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 $n$ coins, each of the ...
[{"type": "stdin_stdout", "input": "1000000000\n", "output": "30"}, {"type": "stdin_stdout", "input": "946942894\n", "output": "30"}, {"type": "stdin_stdout", "input": "781222222\n", "output": "30"}, {"type": "stdin_stdout", "input": "723061816\n", "output": "30"}, {"type": "stdin_stdout", "input": "108461089\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\nMany years have passed, and n fr...
[{"type": "stdin_stdout", "input": "10\n489 685\n857 870\n736 221\n687 697\n166 360\n265 200\n738 519\n393 760\n66 176\n798 160\n", "output": "3231747\n"}, {"type": "stdin_stdout", "input": "10\n864 874\n534 702\n73 363\n856 895\n827 72\n435 468\n888 921\n814 703\n648 715\n384 781\n", "output": "4909752\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\nFox Ciel has n boxes in her room...
[{"type": "stdin_stdout", "input": "100\n100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given N points (x_i,y_i)...
[{"type": "stdin_stdout", "input": "200\n6961 9533\n1847 2184\n9391 1072\n8146 7944\n3403 1703\n2280 4570\n8872 8035\n9417 8677\n8552 1719\n6602 3237\n6223 2519\n654 7141\n8494 2638\n7204 8528\n1352 3164\n1638 4388\n1102 7239\n3795 5213\n6836 786\n9662 2985\n6241 9368\n1325 8963\n1237 5004\n8000 5104\n9833 4105\n8543 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\nGiven an array a_1, a_2, ..., a_...
[{"type": "stdin_stdout", "input": "71\n908209 289 44521 240100 680625 274576 212521 91809 506944 499849 3844 15376 592900 58081 240100 984064 732736 257049 600625 180625 130321 580644 261121 75625 46225 853776 485809 700569 817216 268324 293764 528529 25921 399424 175561 99856 295936 20736 611524 13924 470596 574564 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\nSasha and Kolya decided to get d...
[{"type": "stdin_stdout", "input": "971 108\n706 706 991 706 988 997 996 997 991 996 706 706 996 706 996 984 1000 991 996 1000 724 724 997 991 997 984 997 1000 984 996 996 997 724 997 997 1000 997 724 984 997 996 988 997 706 706 997 1000 991 706 988 997 724 988 706 996 706 724 997 988 996 991 1000 1000 724 988 996 1000...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nKuro and Shiro are playing with ...
[{"type": "stdin_stdout", "input": "7775\n", "output": "499126064\n499126064\n796234435\n114971967\n891826170\n38460928\n746758804\n102098624\n582205169\n762199467\n509915249\n602954502\n392594249\n215817236\n170876474\n643293880\n150463555\n628074695\n355316779\n513918741\n157394975\n757039573\n277888730\n825789360\n8...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 positive integer $a$ is given....
[{"type": "stdin_stdout", "input": "43\n", "output": "93023255813953488372093023255813953488372093023255813953488372093023255813953488372093023255813953488372093023255813953488372093023255813953488372093023255813953488372093023255813953488372093023255813953488372093023255813953488372093023255813953488372093023255813953...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nBike is interested in permutatio...
[{"type": "stdin_stdout", "input": "25\n", "output": "0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 \n0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 \n0 2 4 6 8 10 12 14 16 18 20 22 24 1 3 5 7 9 11 13 15 17 19 21 23 \n"}, {"type": "stdin_stdout", "input": "23\n", "output": "0 1 2 3 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nCountry of Metropolia is holding...
[{"type": "stdin_stdout", "input": "10 10 1\n351 0 3 7\n214 0 9 9\n606 0 7 8\n688 0 9 3\n188 3 0 9\n994 0 1 7\n372 5 0 8\n957 0 3 6\n458 8 0 7\n379 0 4 7\n", "output": "-1\n"}, {"type": "stdin_stdout", "input": "4 10 1\n988 0 1 1\n507 1 0 9\n798 1 0 9\n246 0 3 7\n242 1 0 8\n574 4 0 7\n458 0 4 9\n330 0 2 9\n303 2 0 8\n2...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given two rectangles on ...
[{"type": "stdin_stdout", "input": "217708 823289 162\n", "output": "128074702873.298310000\n"}, {"type": "stdin_stdout", "input": "925659 774524 134\n", "output": "587010971679.470460000\n"}, {"type": "stdin_stdout", "input": "938133 287232 156\n", "output": "182978083107.739690000\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\nFox Ciel is playing a card game ...
[{"type": "stdin_stdout", "input": "36 30\nATK 116\nATK 120\nATK 122\nATK 120\nATK 116\nATK 118\nATK 123\nDEF 2564\nATK 123\nDEF 1810\nATK 124\nATK 120\nDEF 2598\nATK 119\nDEF 2103\nATK 123\nATK 118\nATK 118\nATK 123\nDEF 1988\nATK 122\nATK 120\nDEF 2494\nATK 122\nATK 124\nATK 117\nATK 121\nATK 118\nATK 117\nATK 122\nA...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA popular reality show is recrui...
[{"type": "stdin_stdout", "input": "34 5\n2 2 5 4 3 1 3 5 3 1 3 1 3 5 5 2 1 3 3 3 1 1 1 4 5 1 3 2 5 5 2 1 2 2\n1357 797 4642 4072 3953 4020 207 344 1412 4061 400 214 708 389 567 3294 1336 3746 1513 3539 4220 4720 329 4516 1741 1744 2537 3963 4941 664 1169 4512 3358 4144\n-4668 -1085 109 -899 769 -1132 -2587 1503 760 -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\nToday on a lecture about strings...
[{"type": "stdin_stdout", "input": "yhwepqwyhwepqwyhwepqweahnqtueahnqtueahnqtuyhwepqwyhwepqwyhwepqwyhwepqweahnqtueahnqtuyhwepqweahnqtueahnqtueahnqtueahnqtueahnqtueahnqtu\neahnqtueahnqtueahnqtuyhwepqweahnqtuyhwepqwyhwepqweahnqtuyhwepqweahnqtuyhwepqweahnqtueahnqtuyhwepqweahnqtueahnqtuyhwepqwyhwepqwyhwepqw\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\nSeyyed and MoJaK are friends of ...
[{"type": "stdin_stdout", "input": "8\n", "output": "YES\n3 4\n1 3\n2 4\n2 3\n1 4\n1 2\n7 8\n5 7\n6 8\n6 7\n5 8\n5 6\n4 7\n3 7\n4 6\n1 6\n2 8\n3 8\n2 7\n2 6\n4 5\n4 8\n1 7\n1 8\n3 5\n3 6\n2 5\n1 5\n"}, {"type": "stdin_stdout", "input": "5\n", "output": "YES\n3 5\n3 4\n4 5\n1 3\n2 4\n2 3\n1 4\n1 5\n1 2\n2 5\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\nPolycarp is a beginner programme...
[{"type": "stdin_stdout", "input": "2 1\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaac\n1\n", "output": "Yes\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nGiven is an integer sequence of ...
[{"type": "stdin_stdout", "input": "6\n680824625 680824626 680824626 680824624 680824626 680824624\n", "output": "655804632\n"}, {"type": "stdin_stdout", "input": "6\n612348318 612348320 612348320 612348319 612348318 612348317\n", "output": "110656261\n"}, {"type": "stdin_stdout", "input": "6\n101617840 101617840 10161...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 N be an even number.\nThere ...
[{"type": "stdin_stdout", "input": "5000\n4206 692\n4206 446\n4088 4206\n4206 4283\n4206 4534\n4206 2619\n4206 2629\n721 4206\n4206 4889\n4206 2380\n1560 4206\n4206 3871\n4206 1378\n186 4206\n398 4206\n4206 2747\n2444 4206\n3343 4206\n2456 4206\n4018 4206\n542 4206\n4206 3533\n1776 4206\n2270 4206\n1903 4206\n4206 377\...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 fought bravely to rescue the...
[{"type": "stdin_stdout", "input": "1125899906842623 1125899906742623 1125899906842623\n", "output": "100001\n"}, {"type": "stdin_stdout", "input": "95173251245550 106288351347530 106288351372022\n", "output": "16565\n"}, {"type": "stdin_stdout", "input": "33534354842198 32529564319236 32529564342569\n", "output": "222...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nArseny likes to organize parties...
[{"type": "stdin_stdout", "input": "22 80\n8 22\n5 18\n17 18\n10 22\n9 15\n12 10\n4 21\n2 12\n21 16\n21 7\n13 6\n5 21\n20 1\n11 4\n19 16\n18 16\n17 5\n22 20\n18 4\n6 14\n3 4\n16 11\n1 12\n16 20\n19 4\n17 8\n1 9\n12 3\n8 6\n8 9\n7 1\n7 2\n14 8\n4 12\n20 21\n21 13\n11 7\n15 19\n12 20\n17 13\n13 22\n15 4\n19 12\n18 11\n20...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 an old brown bear. He o...
[{"type": "stdin_stdout", "input": "50\n840868705 387420489 387420489 795385082 634350497 206851546 536870912 536870912 414927754 387420489 387420489 536870912 387420489 149011306 373106005 536870912 700746206 387420489 777952883 847215247 176645254 576664386 387420489 230876513 536870912 536870912 536870912 387420489 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYaroslav has an array, consistin...
[{"type": "stdin_stdout", "input": "27\n-401 -840 -583 -612 -298 -384 798 366 -922 -443 -972 -271 127 -201 992 -748 -351 925 -177 -528 355 5 131 -779 833 -382 -990 -379 -816 681 650 660 624 -112 -652 406 446 -999 259 -778 452 -705 -374 -710 -751 -852 119 -689 -789 96 -984 186 70\n", "output": "28653\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\nLimak is a little polar bear. Po...
[{"type": "stdin_stdout", "input": "6 36\nbf f\nbb d\nff f\nac a\nad c\nbd e\ndd a\naa c\nab a\nba b\naf a\nda c\nce f\nea c\nde a\nca f\ndc f\nec b\ncc a\nae b\nbe b\nbc c\nee e\ncb b\nfb a\ncd d\ndb a\nef a\ncf d\neb c\ndf b\nfd a\ned a\nfe c\nfa b\nfc a\n", "output": "15314\n"}, {"type": "stdin_stdout", "input": "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\nLittle Johnny has recently learn...
[{"type": "stdin_stdout", "input": "2000\n", "output": "323848720\n"}, {"type": "stdin_stdout", "input": "4000\n", "output": "341934157\n"}, {"type": "stdin_stdout", "input": "2345\n", "output": "832335061\n"}, {"type": "stdin_stdout", "input": "2500\n", "output": "544067513\n"}, {"type": "stdin_stdout", "input": "2780...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 polyline going throug...
[{"type": "stdin_stdout", "input": "1000000000 1000000000\n", "output": "1000000000.000000000000\n"}, {"type": "stdin_stdout", "input": "1000000000 111111111\n", "output": "111111111.099999990000\n"}, {"type": "stdin_stdout", "input": "1000000000 999999999\n", "output": "999999999.500000000000\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\nA few years ago Sajjad left his ...
[{"type": "stdin_stdout", "input": "100000\n", "output": "49999\n"}, {"type": "stdin_stdout", "input": "100000\n", "output": "49999\n"}, {"type": "stdin_stdout", "input": "43670\n", "output": "21834\n"}, {"type": "stdin_stdout", "input": "31809\n", "output": "15904\n"}, {"type": "stdin_stdout", "input": "40873\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\nWhat are you doing at the end of...
[{"type": "stdin_stdout", "input": "10\n100000 873326525630182716\n100000 620513733919162415\n100000 482953375281256917\n100000 485328193417229962\n100000 353549227094721271\n100000 367447590857326107\n100000 627193846053528323\n100000 243833127760837417\n100000 287297493528203749\n100000 70867563577617188\n", "output"...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given a rebus of form ? ...
[{"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\nConsider an N \\times N matrix. ...
[{"type": "stdin_stdout", "input": "902\n0 1 1 2 0 2 0 2 2 0 2 0 0 1 0 2 1 0 0 1 1 1 2 0 0 2 0 2 1 2 0 2 2 0 1 2 0 0 2 1 1 0 2 0 0 1 2 0 0 1 0 0 1 1 2 0 0 0 2 2 0 2 1 0 0 2 2 0 0 2 2 1 0 2 2 2 2 0 0 0 1 1 2 0 2 0 1 2 1 1 0 0 1 2 2 2 1 0 2 0 1 2 2 1 2 2 0 0 2 0 1 0 1 0 2 0 0 2 0 0 2 1 2 1 0 2 2 1 1 2 0 2 1 0 1 2 0 0 2 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\nPanic is rising in the committee...
[{"type": "stdin_stdout", "input": "27\nmnpsweykjdvaxyiqtgcuzhbfrlo\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "27\nabcdefghijklmnopqrstuvwxyza\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "26\nadtopxgnculmhfkezrwsvqbiyj\n", "output": "No\n"}, {"type": "stdin_stdout", "input": "15\nnrnuugrur...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 penguin Polo loves his ho...
[{"type": "stdin_stdout", "input": "1000 8\n", "output": "339760446\n"}, {"type": "stdin_stdout", "input": "1000 1\n", "output": "760074701\n"}, {"type": "stdin_stdout", "input": "1000 2\n", "output": "675678679\n"}, {"type": "stdin_stdout", "input": "1000 3\n", "output": "330155123\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\nConsider a table of size $n \\ti...
[{"type": "stdin_stdout", "input": "96 1\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nB\nW\nW\nW\nW\...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 a simplified version of ...
[{"type": "stdin_stdout", "input": "100 50\n29 35\n10 75\n29 34\n10 87\n29 13\n29 38\n41 21\n10 6\n29 94\n10 47\n31 27\n41 24\n41 8\n10 93\n41 52\n41 36\n31 32\n85 81\n31 32\n41 79\n41 99\n85 88\n41 25\n31 68\n41 93\n10 87\n85 97\n41 85\n10 64\n10 68\n85 22\n10 45\n85 15\n10 16\n10 21\n41 66\n29 68\n41 96\n29 34\n10 22...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nCrazy Town is a plane on which t...
[{"type": "stdin_stdout", "input": "841746 527518\n595261 331297\n10\n-946901 129987 670374\n-140388 -684770 309555\n-302589 415564 -387435\n-565799 -72069 -395358\n-523453 -511446 854898\n-846967 -749453 -341866\n-622388 434663 264157\n-638453 625357 344195\n-255265 -676356 -772398\n-824723 -319141 33585\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\nArtsem has a friend Saunders fro...
[{"type": "stdin_stdout", "input": "10\n4 4 4 4 4 4 4 4 4 4\n", "output": "1\n1 1 1 1 1 1 1 1 1 1\n4\n"}, {"type": "stdin_stdout", "input": "7\n7 3 3 5 5 7 7\n", "output": "3\n3 1 1 2 2 3 3\n3 5 7\n"}, {"type": "stdin_stdout", "input": "6\n1 2 3 4 5 5\n", "output": "5\n1 2 3 4 5 5\n1 2 3 4 5\n"}, {"type": "stdin_stdout...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAs a tradition, every year befor...
[{"type": "stdin_stdout", "input": "0110011110111000001101001010101000011011101001001101000000111101010101111101010011101001111010111001\n", "output": "416862683\n"}, {"type": "stdin_stdout", "input": "0111001111110010000001111100110100111110001100100001111111110000010010111010010010010111000110001111\n", "output": "77...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 remote island chain contains n...
[{"type": "stdin_stdout", "input": "10\n6 2 3 8 0 4 9 1 5 7\n2 3 8 4 0 9 1 5 7 6\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "10\n2 4 8 3 6 1 9 0 5 7\n3 6 1 9 0 5 7 2 8 4\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "10\n2 0 1 6 4 9 8 5 3 7\n6 4 9 0 5 3 7 2 1 8\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\nYou need to execute several task...
[{"type": "stdin_stdout", "input": "50\n83 43 73 75 11 53 6 43 67 38 83 12 70 27 60 13 9 79 61 30 29 71 10 11 95 87 26 26 19 99 13 47 66 93 91 47 90 75 68 3 22 29 59 12 44 41 64 3 99 100\n31 36 69 25 18 33 15 70 12 91 41 44 1 96 80 74 12 80 16 82 88 25 87 17 53 63 3 42 81 6 50 78 34 68 65 78 94 14 53 14 41 97 63 44 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\nRecently a serious bug has been ...
[{"type": "stdin_stdout", "input": "10 2\n10 2\n9 3\n9 4\n7 2\n4 6\n10 1\n9 2\n3 10\n7 1\n5 1\n", "output": "43\n"}, {"type": "stdin_stdout", "input": "10 3\n6 3\n6 10\n2 5\n5 7\n6 2\n9 2\n8 1\n10 5\n5 10\n7 6\n", "output": "34\n"}, {"type": "stdin_stdout", "input": "10 1\n4 9\n8 9\n7 6\n1 5\n3 6\n4 3\n4 6\n10 1\n1 8\n...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou have an array a with length ...
[{"type": "stdin_stdout", "input": "15\n10 10 10 10 10 10 21 21 21 21 21 21 21 21 21\n", "output": "15\n"}, {"type": "stdin_stdout", "input": "15\n10 10 10 10 10 10 10 10 10 10 10 10 15 15 21\n", "output": "17\n"}, {"type": "stdin_stdout", "input": "13\n10 10 10 15 15 15 15 15 15 15 15 21 21\n", "output": "21\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\nFirst-rate specialists graduate ...
[{"type": "stdin_stdout", "input": "affviytdmexpwfqplpyrlniprbdphrcwlboacoqec\n", "output": "67\nac\naco\nbd\nbdp\nbo\nboa\nco\ncoq\ncw\ncwl\ndm\ndme\ndp\ndph\nec\nex\nexp\nfq\nfqp\nhr\nhrc\nip\nipr\nlb\nlbo\nln\nlni\nlp\nlpy\nme\nmex\nni\nnip\noa\noac\noq\nph\nphr\npl\nplp\npr\nprb\npw\npwf\npy\npyr\nqec\nqp\nqpl\nrb\...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 famous global economic crisi...
[{"type": "stdin_stdout", "input": "10 10\n##.#..#.#2\n...###....\n#..#....##\n.....#....\n.#........\n.....#####\n...#..#...\n....###...\n###.##...#\n.#...1#.3.\n", "output": "-1\n"}, {"type": "stdin_stdout", "input": "10 10\n#...33.#.#\n#.#.33.#1.\n2.....#.11\n222#.#.#..\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\nA bracketed sequence is called c...
[{"type": "stdin_stdout", "input": "101\n(())))))()))()())(()))((())))((())(()()()(()()((()()((()((())))((()))()(())(()(())((()))(()))()(((()(\n", "output": "-1\n"}, {"type": "stdin_stdout", "input": "100\n)()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(\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\nBigData Inc. is a corporation th...
[{"type": "stdin_stdout", "input": "10 30 7\n5 4 2 3 3 2 5 0 1 6\n7 2\n2 4\n9 3\n3 5\n5 2\n7 10\n6 5\n10 1\n9 8\n10 8\n3 4\n10 4\n4 2\n7 6\n2 8\n1 10\n5 10\n5 6\n5 6\n6 2\n6 5\n9 10\n8 6\n2 4\n9 7\n1 9\n10 4\n6 10\n9 3\n2 7\n", "output": "8\n10 7 2 4 3 9 8 5 "}, {"type": "stdin_stdout", "input": "10 30 10\n7 9 1 5 4 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\nRecently Ivan the Fool decided t...
[{"type": "stdin_stdout", "input": "100000 100000\n", "output": "870472905\n"}, {"type": "stdin_stdout", "input": "86821 24538\n", "output": "1000000005\n"}, {"type": "stdin_stdout", "input": "99999 100000\n", "output": "758107445\n"}, {"type": "stdin_stdout", "input": "100000 99999\n", "output": "758107445\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\nLet's call an array consisting o...
[{"type": "stdin_stdout", "input": "58 38\n6384 48910\n97759 90589\n28947 5031\n45169 32592\n85656 26360\n88538 42484\n44042 88351\n42837 79021\n96022 59200\n485 96735\n98000 3939\n3789 64468\n10894 58484\n26422 26618\n25515 95617\n37452 5250\n39557 66304\n79009 40610\n80703 60486\n90344 37588\n57504 61201\n62619 79797...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nBessie the cow has just intercep...
[{"type": "stdin_stdout", "input": "abcdefghijklyyyyyyymnopqrstuvwxabcdefghijklyyyyyyymnopqrstuvwxabcdefghijklyyyyyyymnopqrstuvwxabcdefghijklyyyyyyymnopqrstuvwxabcdefghijklyyyyyyymnopqrstuvwxabcdefghijklzzzzzzzmnopqrstuvwxabcdefghijklzzzzzzzmnopqrstuvwxabcdefghijklzzzzzzzmnopqrstuvwxabcdefghijklzzzzzzzmnopqrstuvwxabcde...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 has been selling state se...
[{"type": "stdin_stdout", "input": "100000000000000000\n", "output": "33333333333333334\n"}, {"type": "stdin_stdout", "input": "99999999999999997\n", "output": "33333333333333333\n"}, {"type": "stdin_stdout", "input": "99999999999999999\n", "output": "3703703703703704\n"}, {"type": "stdin_stdout", "input": "97626528902...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nNote that girls in Arpa’s land a...
[{"type": "stdin_stdout", "input": "26\n8 10\n52 21\n2 33\n18 34\n30 51\n5 19\n22 32\n36 28\n42 16\n13 49\n11 17\n31 39\n43 37\n50 15\n29 20\n35 46\n47 23\n3 1\n44 7\n9 27\n6 48\n40 24\n26 14\n45 4\n12 25\n41 38\n", "output": "2 1\n1 2\n2 1\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n2 1\n1 2\n1 2\n1 2\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYour friend recently gave you so...
[{"type": "stdin_stdout", "input": "97205\n", "output": "17 15 14 13 12 10 9 8 6 5 3 1\n"}, {"type": "stdin_stdout", "input": "97593\n", "output": "17 15 14 13 12 11 9 6 5 4 1\n"}, {"type": "stdin_stdout", "input": "32728\n", "output": "15 14 13 12 11 10 9 8 7 5 4\n"}, {"type": "stdin_stdout", "input": "85371\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\nKolya has a string s of length n...
[{"type": "stdin_stdout", "input": "115\nz9c2f5fxz9z999c9z999f9f9x99559f5Vf955c59E9ccz5fcc99xfzcEx29xuE55f995u592xE58Exc9zVff885u9cf59cV5xc999fx5x55u992fx9x\n", "output": "5\n22555555555555555555522 89999999999899999999998 999999EEVccEccVEE999999 ccccfffffffVfffffffcccc uuxxxxxxzzzzzzzxxxxxxuu "}, {"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\nPolycarpus takes part in the \"F...
[{"type": "stdin_stdout", "input": "16\nx*d**s******xd*u\n22\nxfdeoshogyqjxdmu\nxvdvdsnwfwakxdyu\nxfdjoshftykjxdmu\nxfdcoshfwyajxdmu\nxfdfoshkmyajxdmu\nxfdyoshpoycjxdmu\nxmdhcswqnhxjxdtu\nxxdxwsoogqzwxdcu\nxxdhhsxqzciuxdfu\nxddcmswqzksqxdhu\nxfdtoshioyvjxdmu\nxsdxmsfmgjbyxdgu\nxadfssplfnlbxdru\nxndcasykmqmbxdru\nxrdxgs...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nInstructors of Some Informatics ...
[{"type": "stdin_stdout", "input": "100 3 30\n20 10 8 3 97 20 40 4 58 24 105 56 26 21 66 1 126 4 21 46 8 2 9 21 0 13 24 53 58 23 3 107 1 22 189 3 31 4 31 0 3 0 9 43 19 74 92 7 71 22 46 26 31 49 18 3 10 9 9 110 30 2 40 21 33 4 11 14 47 4 1 37 3 19 18 63 10 53 19 35 11 57 8 3 11 27 23 5 45 15 127 27 23 48 3 8 20 33 5 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\nRikhail Mubinchik believes that ...
[{"type": "stdin_stdout", "input": "10000 239\n", "output": "1168638\n"}, {"type": "stdin_stdout", "input": "10000 10000\n", "output": "40\n"}, {"type": "stdin_stdout", "input": "5858 674\n", "output": "71118\n"}, {"type": "stdin_stdout", "input": "620 35\n", "output": "251262\n"}, {"type": "stdin_stdout", "input": "10...
code_stdio