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\nGiven is an integer N.\nDetermin... | [{"type": "stdin_stdout", "input": "748307129767950488\n", "output": "37 25\n"}, {"type": "stdin_stdout", "input": "450283905890997368\n", "output": "37 1\n"}, {"type": "stdin_stdout", "input": "298023223876953128\n", "output": "1 25\n"}, {"type": "stdin_stdout", "input": "150094635296999246\n", "output": "36 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\nCaracal is fighting with a monst... | [{"type": "stdin_stdout", "input": "1000000000000\n", "output": "1099511627775\n"}, {"type": "stdin_stdout", "input": "999999999999\n", "output": "1099511627775\n"}, {"type": "stdin_stdout", "input": "549755813888\n", "output": "1099511627775\n"}, {"type": "stdin_stdout", "input": "707813884927\n", "output": "109951162... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nFind the number of integers betw... | [{"type": "stdin_stdout", "input": "9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999\n3\n", "output": "117879300\n"}, {"type": "stdin_stdout", "input": "9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999\n2\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\nTokitsukaze is one of the charac... | [{"type": "stdin_stdout", "input": "100\n", "output": "1 A\n"}, {"type": "stdin_stdout", "input": "33\n", "output": "0 A\n"}, {"type": "stdin_stdout", "input": "98\n", "output": "1 B\n"}, {"type": "stdin_stdout", "input": "30\n", "output": "1 B\n"}, {"type": "stdin_stdout", "input": "43\n", "output": "2 A\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\nBob is an active user of the soc... | [{"type": "stdin_stdout", "input": "35\n21 26 18 4 28 2 15 13 16 25 6 32 11 5 31 17 9 3 24 33 14 27 29 1 20 4 12 7 10 30 34 8 19 23 22\n", "output": "13 15 17 19 21 \n"}, {"type": "stdin_stdout", "input": "19\n2 3 2 2 2 2 2 2 2 2 19 3 2 2 2 2 2 2 19\n", "output": "2 4 \n"}, {"type": "stdin_stdout", "input": "19\n2 2 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\nOn her way to programming school... | [{"type": "stdin_stdout", "input": "100 100\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "100 99\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "99 100\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "74 73\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "57 57\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 two arrays A and B... | [{"type": "stdin_stdout", "input": "20 30\n19 29\n1 1 2 2 2 3 4 4 7 7 7 8 8 8 8 8 9 9 9 9\n6 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 10 10 10 10 10 10 10 10 10 10 10 10 10 10\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "20 30\n2 8\n6 7 7 7 7 7 7 8 8 8 8 9 9 9 9 10 10 10 10 10\n1 1 2 2 2 2 2 2 2 3 3 4 5 5 5 5 6 6 6 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\nPetya is a beginner programmer. ... | [{"type": "stdin_stdout", "input": "150\n48 115 13 9 105 117 41 136 123 32 84 95 62 50 140 106 145 91 57 141 139 35 45 27 129 63 137 10 37 60 44 30 101 119 138 78 22 103 39 134 49 36 25 12 28 67 69 99 148 26 16 87 146 65 8 74 14 38 47 89 81 19 40 11 64 43 110 66 102 3 122 124 100 2 125 42 97 73 121 7 52 23 29 109 1 70 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 array $b$ is called to be a s... | [{"type": "stdin_stdout", "input": "94 2 17\n9576 -3108 -5821 4770 -2229 -8216 2947 -6820 5061 979 5595 3594 345 416 -3096 1595 -6589 -8121 9803 -2239 8316 -4841 -9490 -9915 7229 -9579 1383 -6737 3077 -8014 9061 -6238 190 240 3703 3316 4763 -2966 -8645 6458 -2526 6161 2250 -6623 7926 267 -6612 7748 3818 -3645 -6669 -92... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given an array $A$, cons... | [{"type": "stdin_stdout", "input": "52\n197 90 23 11 63 198 24 132 68 58 195 100 101 120 96 77 132 155 62 197 170 117 189 160 194 106 172 124 180 75 124 51 51 93 186 93 79 111 161 67 84 183 150 125 25 46 106 29 170 175 4 122\n18\n95 28 20 190 75 89 193 152 53 79 100 3 154 42 67 5 137 60\n", "output": "198 193"}, {"type... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere are n cities in Westeros. ... | [{"type": "stdin_stdout", "input": "4 4\n194368 948570 852413 562719\n", "output": "Daenerys\n"}, {"type": "stdin_stdout", "input": "4 4\n391529 690539 830662 546622\n", "output": "Daenerys\n"}, {"type": "stdin_stdout", "input": "6 3\n346 118 330 1403 5244 480\n", "output": "Daenerys\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\nSaitama accidentally destroyed a... | [{"type": "stdin_stdout", "input": "100 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\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\nThere was an electronic store he... | [{"type": "stdin_stdout", "input": "40\n194 121 110 134 172 142 195 135 186 187 128 161 185 132 117 175 178 131 143 151 170 181 188 140 133 145 119 129 179 149 109 123 124 106 100 199 197 155 141 183\n", "output": "60\n"}, {"type": "stdin_stdout", "input": "30\n793 656 534 608 971 970 670 786 978 665 92 391 328 228 340... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nVery soon there will be a parade... | [{"type": "stdin_stdout", "input": "10\n18 18\n71 471\n121 362\n467 107\n138 254\n13 337\n499 373\n337 387\n147 417\n76 417\n", "output": "4\n"}, {"type": "stdin_stdout", "input": "7\n2 1\n2 1\n2 1\n2 1\n1 200\n1 200\n1 200\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "6\n5 9\n1 3\n4 8\n4 5\n23 54\n12 32\n",... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given an array a with n ... | [{"type": "stdin_stdout", "input": "10 2\n1 0 0 1 0 1 0 1 0 1\n", "output": "5\n1 0 0 1 1 1 1 1 0 1\n"}, {"type": "stdin_stdout", "input": "10 3\n0 0 1 0 0 1 0 0 1 1\n", "output": "6\n0 0 1 0 1 1 1 1 1 1\n"}, {"type": "stdin_stdout", "input": "7 1\n1 0 0 1 1 0 1\n", "output": "4\n1 0 0 1 1 1 1\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\nIA has so many colorful magnets ... | [{"type": "stdin_stdout", "input": "abaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaab\n", "output": "0 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 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\nPetya has k matches, placed in n... | [{"type": "stdin_stdout", "input": "100\n6 3 4 5 3 4 2 4 1 2 4 1 8 5 2 2 4 4 6 8 4 10 4 4 6 8 6 5 5 4 8 4 3 3 6 5 7 2 9 7 6 5 6 3 2 6 8 10 3 6 8 7 2 3 5 4 8 6 5 6 6 8 4 1 5 6 1 8 12 5 3 3 8 2 4 2 4 5 6 6 9 5 1 2 8 8 3 7 5 3 4 5 7 6 3 9 4 6 3 6\n", "output": "867\n"}, {"type": "stdin_stdout", "input": "20\n1000000000 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\nYaroslav has an array that consi... | [{"type": "stdin_stdout", "input": "56\n516 76 516 197 516 427 174 516 706 813 94 37 516 815 516 516 937 483 16 516 842 516 638 691 516 635 516 516 453 263 516 516 635 257 125 214 29 81 516 51 362 516 677 516 903 516 949 654 221 924 516 879 516 516 972 516\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "48\n... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nNotice that the memory limit is ... | [{"type": "stdin_stdout", "input": "50\n97 97\n61 61\n59 59\n29 29\n13 13\n7 7\n5 5\n3 3\n1 1\n3 3\n1 1\n13 13\n11 11\n9 9\n3 3\n1 1\n1 1\n1 1\n27 27\n25 25\n1 1\n21 21\n19 19\n17 17\n15 15\n5 5\n1 1\n1 1\n7 7\n1 1\n3 3\n1 1\n15 15\n13 13\n1 1\n9 9\n7 7\n5 5\n3 3\n1 1\n15 15\n5 5\n1 1\n1 1\n3 3\n1 1\n1 1\n1 1\n1 1\n1 1... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nPetya has recently learned data ... | [{"type": "stdin_stdout", "input": "8\ninsert 219147240\nremoveMin\ngetMin 923854124\nremoveMin\ngetMin -876779400\nremoveMin\ninsert 387686853\ngetMin 749998368\n", "output": "12\ninsert 219147240\nremoveMin\ninsert 923854124\ngetMin 923854124\nremoveMin\ninsert -876779400\ngetMin -876779400\nremoveMin\ninsert 3876868... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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\n6 9 1 7 6 4 1 9 3 2 4 6 2 5 3 10 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 3 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 5 2 4 6 10 8\n6 9 7 8 7 1 4 3 5 8\n", "output": "2\n76 77 \n"}, {"typ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLittle boy Valera studies an alg... | [{"type": "stdin_stdout", "input": "50\n", "output": "50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 "}, {"type": "stdin_stdout", "input": "50\n", "output": "50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 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\nBizon the Champion isn't just at... | [{"type": "stdin_stdout", "input": "30\n1 4 5 3 9 7 8 4 5 9 2 3 4 2 3 4 5 5 6 8 1 2 9 4 3 7 2 6 5 4\n", "output": "26\n"}, {"type": "stdin_stdout", "input": "8\n5000 5000 5 5000 5000 5000 5000 5000\n", "output": "8\n"}, {"type": "stdin_stdout", "input": "14\n1 1 3 1 1 4 4 4 4 4 4 4 4 4\n", "output": "5\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\nRecently Irina arrived to one of... | [{"type": "stdin_stdout", "input": "10 45 8\n1 2 1\n1 3 1\n1 4 1\n1 5 1\n1 6 1\n1 7 1\n1 8 1\n1 9 1\n1 10 1\n2 3 1\n2 4 1\n2 5 1\n2 6 1\n2 7 1\n2 8 1\n2 9 1\n2 10 1\n3 4 1\n3 5 1\n3 6 1\n3 7 1\n3 8 1\n3 9 1\n3 10 1\n4 5 1\n4 6 1\n4 7 1\n4 8 1\n4 9 1\n4 10 1\n5 6 1\n5 7 1\n5 8 1\n5 9 1\n5 10 1\n6 7 1\n6 8 1\n6 9 1\n6 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\nRoma works in a company that sel... | [{"type": "stdin_stdout", "input": "17 27\n257 320 676 1136 2068 2505 2639 4225 4951 5786 7677 7697 7851 8337 8429 8469 9343\n", "output": "81852\n"}, {"type": "stdin_stdout", "input": "12 28\n-6652 -6621 -6471 -5559 -5326 -4551 -4401 -4326 -3294 -1175 -1069 -43\n", "output": "49488\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\nA multi-subject competition is c... | [{"type": "stdin_stdout", "input": "19 2\n1 2\n1 -3\n1 -1\n1 -2\n2 0\n1 -2\n1 -3\n2 -2\n2 -4\n2 -3\n2 0\n1 2\n1 -1\n1 -2\n1 -3\n1 -4\n2 2\n1 1\n1 -4\n", "output": "7\n"}, {"type": "stdin_stdout", "input": "18 6\n5 2\n3 1\n3 -4\n2 -1\n5 3\n4 -3\n5 4\n3 4\n4 -2\n1 4\n5 -4\n5 -1\n1 -2\n1 4\n6 -3\n4 -1\n5 4\n5 -1\n", "outp... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nXenia the beginner mathematician... | [{"type": "stdin_stdout", "input": "2+3+3+1+2+2+2+1+1+2+1+3+2+2+3+3+2+2+3+3+3+1+1+1+3+3+3+2+1+3+2+3+2+1+1+3+3+3+1+2+2+1+2+2+1+2+1+3+1+1\n", "output": "1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+3+3+3+3+3+3+3+3+3+3+3+3+3+3+3+3+3\n"}, {"type": "stdin_stdout", "input": "2+1+2+2+1+3+2+3+1+1+2+1+2+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\nPeople do many crazy things to s... | [{"type": "stdin_stdout", "input": "6 2\n", "output": "117\n1 7 8 9 10 11\n2 12 13 14 15 16\n3 17 18 19 20 21\n4 22 23 24 25 26\n5 27 28 29 30 31\n6 32 33 34 35 36\n"}, {"type": "stdin_stdout", "input": "6 3\n", "output": "138\n1 2 13 14 15 16\n3 4 17 18 19 20\n5 6 21 22 23 24\n7 8 25 26 27 28\n9 10 29 30 31 32\n11 12 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nBob is an avid fan of the video ... | [{"type": "stdin_stdout", "input": "9\n7 5 3\n8 9 4\n8 1 7\n8 9 1\n1 5 7\n2 3 5\n6 3 2\n", "output": "4 9 8 1 7 5 3 2 6 \n"}, {"type": "stdin_stdout", "input": "9\n1 8 9\n9 6 4\n2 1 3\n1 2 8\n3 5 2\n6 7 4\n8 9 4\n", "output": "5 3 2 1 8 9 4 6 7 \n"}, {"type": "stdin_stdout", "input": "9\n6 9 8\n2 3 4\n2 3 1\n5 6 8\n4 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\nIt's the year 5555. You have a g... | [{"type": "stdin_stdout", "input": "26 59\n9 23\n16 21\n20 14\n20 17\n24 20\n12 8\n18 21\n3 14\n3 18\n3 1\n2 8\n26 5\n12 2\n10 8\n23 22\n16 18\n24 25\n19 21\n3 4\n16 6\n2 4\n12 10\n3 26\n3 2\n7 13\n10 2\n16 19\n7 5\n20 25\n15 23\n1 22\n3 10\n6 19\n15 22\n5 13\n11 7\n14 25\n9 22\n26 13\n14 17\n11 13\n1 9\n3 12\n1 15\n11... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given an array $a$ consi... | [{"type": "stdin_stdout", "input": "3\n754191320 -760574499 -416425254\n", "output": "1 1 2\n1 2 3\n"}, {"type": "stdin_stdout", "input": "3\n-282808876 -671988567 -110199577\n", "output": "2 3\n1 1 2\n"}, {"type": "stdin_stdout", "input": "3\n901757671 602032179 648227272\n", "output": "1 1 2\n1 2 3\n"}, {"type": "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\nLet's call the following process... | [{"type": "stdin_stdout", "input": "21\n", "output": "1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 4 4 4 8 16 "}, {"type": "stdin_stdout", "input": "20\n", "output": "1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 4 4 4 8 16 "}, {"type": "stdin_stdout", "input": "19\n", "output": "1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 4 4 8 16 "}, {"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\nShichikuji is the new resident d... | [{"type": "stdin_stdout", "input": "6\n734304 42385\n464187 237466\n222360 313647\n364202 733043\n89833 694920\n398339 845862\n877584430 903224720 864319998 168282570 210185542 507819772\n660835099 966875896 281317003 56653645 396685040 815735737\n", "output": "3531417032\n6\n1 2 3 4 5 6 \n0\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\nDima, Inna and Seryozha have gat... | [{"type": "stdin_stdout", "input": "88 10\n6 64 43 1 1 1 8 15 39 1 95 2 1 80 36 40 25 2 52 24 29 26 16 45 96 99 1 91 16 97 67 1 39 91 1 41 72 67 93 84 1 12 67 53 26 1 14 39 94 92 28 75 10 16 81 97 77 22 1 1 41 90 51 49 90 74 5 61 1 45 88 1 40 7 4 59 16 33 6 4 92 1 38 20 4 53 10 80\n70 45 1 73 52 1 20 78 68 98 1 95 2 61... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 Bitlandians are quite weird ... | [{"type": "stdin_stdout", "input": "1000000000000000000000000000000000000011111111000000000000\n0111111111100000000000111111111000000000000000111111110001\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "0000000000000000000000000000000000000000\n00000000000000000000000000000000000000000\n", "output": "NO\n"},... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nJafar has n cans of cola. Each c... | [{"type": "stdin_stdout", "input": "10\n15 26 15 14 14 39 40 4 25 39\n27 72 16 44 69 48 53 17 63 42\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "10\n9 10 24 11 1 7 8 3 28 14\n86 20 34 11 22 94 8 16 73 85\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "6\n18 25 3 10 13 37\n38 73 19 35 24 37\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\nThis is the first subtask of pro... | [{"type": "stdin_stdout", "input": "144 144\n5 62 104 123 137 128 79 17 12 93 122 34 116 25 42 109 114 105 83 21 10 95 94 126 33 68 75 24 131 67 11 134 124 39 97 7 61 90 117 46 142 92 81 118 85 35 89 86 111 43 53 63 27 44 135 59 52 49 6 20 91 26 16 45 102 69 141 98 66 38 84 87 18 57 71 41 47 129 28 125 119 107 15 14 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\nBachgold problem is very easy to... | [{"type": "stdin_stdout", "input": "202\n", "output": "101\n2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2\n"}, {"type": "stdin_stdout", "input": "93\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\nThere are $n$ candy boxes in fro... | [{"type": "stdin_stdout", "input": "50 49 1000\n30 37 34 31 26 44 32 12 36 15 5 5 31 24 17 24 43 19 17 23 45 2 24 17 23 48 20 44 46 44 13 4 29 49 33 41 14 25 46 43 7 47 28 25 2 30 37 37 19 32\nGBBBRBGRBRBRGRGRBBGBGRRBGGRBGRBRRRRRRRBRGRGGGGBRGG\n", "output": "-1\n"}, {"type": "stdin_stdout", "input": "50 37 500\n25 43 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\nThere are N islands and M bridge... | [{"type": "stdin_stdout", "input": "29 45\n1 3\n2 3\n2 14\n2 19\n2 29\n3 26\n4 5\n4 6\n4 13\n4 17\n5 10\n5 19\n5 24\n6 18\n6 19\n6 24\n6 25\n6 28\n6 29\n8 9\n9 18\n9 25\n10 29\n11 16\n11 22\n12 14\n12 15\n12 26\n12 29\n13 14\n14 20\n14 27\n14 29\n15 16\n15 22\n15 25\n15 29\n16 29\n17 27\n19 26\n20 29\n24 26\n15 23\n1 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\nGiven is a tree G with N vertice... | [{"type": "stdin_stdout", "input": "672\n275 321\n185 433\n215 344\n22 130\n494 568\n440 636\n80 228\n179 409\n240 296\n273 576\n388 462\n19 69\n38 212\n76 622\n13 341\n532 558\n70 165\n121 615\n337 632\n92 293\n270 436\n91 125\n51 84\n295 326\n4 12\n440 494\n216 221\n273 284\n244 311\n221 268\n102 204\n146 233\n198 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\nWe have a string S of length N c... | [{"type": "stdin_stdout", "input": "4000\nGBRBRGGRRBRGBBGGRRGBRGGBRGGGBBGRGBRBRGGBGGGGRRGGBGGRGGGGRRGGRRGBBBGGRBGRRBBGGBRRBGGGGGBGGBGGRBBBGBGRGGRBGGRGRRRBRGBBBGGGRRBGRBBGGRGGRGRBGRRBGGRBRGGBBRGBRGRRGGRBGBRGBRGRRBGBRRBGRGBBGBRBGBBRBBGBBGBGGRBBRGRRGGRRBBBBRBBGBBGGRGRBBGGGBGGGGRRBBRGBBBBBRGGGBGGBBBRGRGRBGGGGBGBRGGBRGBRRRB... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 years, the Day of city N was... | [{"type": "stdin_stdout", "input": "100 7 7\n958 322 975 921 115 647 61 232 127 277 839 797 261 632 788 381 191 117 663 959 475 166 471 984 17 473 57 809 65 881 580 725 587 933 466 537 627 706 927 173 573 372 644 492 835 893 792 494 808 977 479 109 949 21 625 104 626 569 524 504 16 257 274 285 404 629 247 609 303 602 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\nOn a random day, Neko found $n$ ... | [{"type": "stdin_stdout", "input": "10 10\n522312461 931001459 598654597 488228616 544064902 21923894 329635457 980089248 988262691 654502493\n967529230 543358150 835120075 128123793 809901567 613170206 152157661 479980560 859252956 318029856\n", "output": "10"}, {"type": "stdin_stdout", "input": "27 9\n72 105 100 105 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 a break Vanya came to the cla... | [{"type": "stdin_stdout", "input": "20 30\n30095551 1073741823 319405832 582219539 834291739 1073741823 834291739 491522284 582219539 812740772 261001051 553222931 796331080 759003208 759003208 0 1043646272 1073741823 834291739 1073741823\n", "output": "193"}, {"type": "stdin_stdout", "input": "20 30\n12966621 60525880... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 schoolchildren, boys... | [{"type": "stdin_stdout", "input": "MFFFMMFMFMFMFFFMMMFFMMMMMMFMMFFMMMFMMFMFFFMMFMMMFFMMFFFFFMFMFFFMMMFFFMFMFMFMFFFMMMMFMMFMMFFMMMMMMFFM\n", "output": "54\n"}, {"type": "stdin_stdout", "input": "MMMMMFFMFMFMFMMFMMFFMMFMFFFFFFFMFFFMMMMMMFFMMMFMFMMFMFFMMFMMMFFFFFMMMMMFMMMMFMMMFFMFFMFFFMFFMFFMMFFM\n", "output": "58\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\nArkady is playing Battleship. Th... | [{"type": "stdin_stdout", "input": "19 6\n##..............###\n#......#####.....##\n.....#########.....\n....###########....\n...#############...\n..###############..\n.#################.\n.#################.\n.#################.\n.#################.\n#####....##....####\n####............###\n####............###\n#####... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nDanny, the local Math Maniac, is... | [{"type": "stdin_stdout", "input": "41\n67695023 47580738 52676259 26530025 83455112 9118634 23011073 86422683 89065733 42852564 97383338 95729385 6219705 42027049 79082264 1205076 1191075 18025596 75651485 93690196 63851880 23817841 79285846 9296266 60979868 62770176 40911517 96687661 35967137 55930828 78662969 519397... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 binary matrix $A... | [{"type": "stdin_stdout", "input": "16\nFFC0\nFFC0\nFFC0\nFFC0\nFFC0\nFFC0\nFFC0\nFFC0\nFFC0\nFFC0\nFFC0\nFFC0\nFFC0\nFFC0\nFFC0\nFFC0\n", "output": "2\n"}, {"type": "stdin_stdout", "input": "12\nFC0\nFC0\nFC0\nFC0\nFC0\nFC0\nFC0\nFC0\nFC0\nFC0\nFC0\nFC0\n", "output": "6\n"}, {"type": "stdin_stdout", "input": "12\n100\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 we all know Barney's job is \... | [{"type": "stdin_stdout", "input": "12\n254904759290707697 475737283258450340 533306428548398547 442127134828578937 779740159015946254 272877594683860919 93000149670491971 349640818793278778 498293278222136720 551099726729989816 149940343283925029 989425634209891686\n", "output": "674872752/24618241\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\nThe rules of Sith Tournament are... | [{"type": "stdin_stdout", "input": "7\n0.000000 0.311935 0.623164 0.667542 0.225988 0.921559 0.575083\n0.688065 0.000000 0.889215 0.651525 0.119843 0.635314 0.564710\n0.376836 0.110785 0.000000 0.583317 0.175043 0.795995 0.836790\n0.332458 0.348475 0.416683 0.000000 0.263615 0.469602 0.883191\n0.774012 0.880157 0.82495... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAshish has an array $a$ of size ... | [{"type": "stdin_stdout", "input": "10 4\n91239 51189 50977 96098 56330 55725 6448 7351 60071 93359\n", "output": "50977"}, {"type": "stdin_stdout", "input": "9 6\n61893 41300 6953 17157 3356 96839 77399 31252 37704\n", "output": "31252"}, {"type": "stdin_stdout", "input": "8 2\n53334 11332 30400 32538 96555 59257 5306... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 Berland a bus travels along t... | [{"type": "stdin_stdout", "input": "6\n2 3 5 7 9 11\n11\n1 2 2 3 3 4 4 5 5 5 6\n", "output": "18\n"}, {"type": "stdin_stdout", "input": "6\n2 3 5 7 11 13\n9\n1 2 2 3 3 4 5 5 6\n", "output": "16\n"}, {"type": "stdin_stdout", "input": "2\n1 1000000000\n4\n1 1 2 2\n", "output": "2999999997\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\nBerlanders like to eat cones aft... | [{"type": "stdin_stdout", "input": "10 10\n971 -2437\n-3336 3332\n-7503 -8713\n-9337 -9607\n-927 -9162\n-4375 -3790\n-913 -257\n-5916 5783\n5131 -7304\n9993 -9999\n-2774 8057\n8670 -7936\n8388 3302\n8718 -4865\n3329 -3334\n5088 -1539\n5050 8130\n4710 -2803\n8124 -4062\n-10000 9997\n", "output": "YES\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\nKilani is playing a game with hi... | [{"type": "stdin_stdout", "input": "4 7 2\n13 1\n....###\n.#..1..\n.#.###.\n2#.....\n", "output": "18 1 \n"}, {"type": "stdin_stdout", "input": "4 7 2\n13 1\n###....\n..1..#.\n.###.#.\n.....#2\n", "output": "18 1 \n"}, {"type": "stdin_stdout", "input": "3 8 3\n1 1 1\n.222.321\n2.##3.31\n2#1.2131\n", "output": "7 10 4 \... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\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\nRecently Polycarp noticed that s... | [{"type": "stdin_stdout", "input": "1\nammsdsdadasdsadssadassadsadasdsadsadr\n", "output": "adrs\n"}, {"type": "stdin_stdout", "input": "1\nammsdsdadasdsadsadassadsadasdsadsadr\n", "output": "adrs\n"}, {"type": "stdin_stdout", "input": "1\nlksjnksjfksjfksjfksjnfksjfsksjdf\n", "output": "dfjklns\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 given n points on the st... | [{"type": "stdin_stdout", "input": "10 10\n2 52 280 401 416 499 721 791 841 943\n246 348 447 486 507 566 568 633 953 986\n", "output": "244\n"}, {"type": "stdin_stdout", "input": "1 21\n3\n3 10 23 32 34 40 42 49 49 50 50 58 70 71 71 74 76 79 79 80 83\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "10 10\n1 1 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\nOn his trip to Luxor and Aswan, ... | [{"type": "stdin_stdout", "input": "90 61394040\n2480 6212 4506 829 8191 797 5336 6722 3178 1007 5849 3061 3588 6684 5983 5452 7654 5321 660 2569 2809 2179 679 4858 6887 2580 6880 6120 4159 5542 4999 8703 2386 8221 7046 1229 1662 4542 7089 3548 4298 1973 1854 2473 5507 241 359 5248 7907 5201 9624 4596 1723 2622 4800 47... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou will receive 3 points for so... | [{"type": "stdin_stdout", "input": "CCCTTCACCCGGATCCAAATCCCTTAGAAATAATCCCCGACGGCGTTGTATCACCTCTGCACTTGTTAGTAAGGTCAGGCGTCCATTACGGAAGAACGTA\n", "output": "19\n"}, {"type": "stdin_stdout", "input": "GCATTACATGGGGGGGTCCTACGAGCCCGGCATCCCGGAAACTAGCCGGTTAATTTGGTTTAAACCCTCCCACCCCGGATTGTAACCCCCCTCATTGGTT\n", "output": "17\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\nAndrewid the Android is a galaxy... | [{"type": "stdin_stdout", "input": "9\n011111101\n", "output": "5\n"}, {"type": "stdin_stdout", "input": "8\n11101111\n", "output": "6\n"}, {"type": "stdin_stdout", "input": "8\n01011100\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "7\n0000011\n", "output": "3\n"}, {"type": "stdin_stdout", "input": "7\n11100... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nReforms continue entering Berlan... | [{"type": "stdin_stdout", "input": "98 24\n91 20 12 75 44 22 22 67 28 100 8 41 31 47 95 87 5 54 7 49 32 46 42 37 45 22 29 15 54 98 46 94 69 47 60 1 15 76 17 82 46 22 32 34 91 37 30 26 92 77 69 11 59 78 24 66 88 15 32 49 46 14 57 20 5 69 53 99 81 70 67 22 54 31 49 52 46 51 46 2 53 59 8 66 28 53 54 5 85 75 15 55 87 16 68... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 array $a$ of lengt... | [{"type": "stdin_stdout", "input": "39 1\n4 2 1 1 3 5 1 5 1 1 3 3 4 3 1 1 4 5 1 5 2 3 3 1 5 1 2 1 1 4 1 1 5 2 2 1 1 2 4\n", "output": "19\n"}, {"type": "stdin_stdout", "input": "29 3\n1 4 3 4 3 3 4 1 1 3 4 1 3 3 4 1 3 1 2 3 1 4 2 2 3 4 2 4 2\n", "output": "12\n"}, {"type": "stdin_stdout", "input": "18 1\n1 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\nLevko loves permutations very mu... | [{"type": "stdin_stdout", "input": "47 46\n", "output": "1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 \n"}, {"type": "stdin_stdout", "input": "10 9\n", "output": "1 2 3 4 5 6 7 8 9 10 \n"}, {"type": "stdin_stdout", "input": "7 4\n", ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLittle X and Little Z are good f... | [{"type": "stdin_stdout", "input": "13 42 292 733\n304 308\n362 365\n396 397\n686 688\n719 722\n815 816\n901 902\n904 905\n921 924\n929 933\n953 954\n977 980\n982 985\n28 30\n36 37\n108 112\n123 127\n134 135\n151 153\n160 162\n203 205\n208 212\n240 243\n261 264\n271 274\n294 297\n356 358\n383 385\n408 412\n415 418\n435... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nTwo bears are playing tic-tac-to... | [{"type": "stdin_stdout", "input": "... ... ...\n... ... ...\n... ... ...\n\n... ... ...\n... ... ...\n... x.. ...\n\n... ... ...\n... ... ...\n... ... ...\n6 4\n", "output": "... ... ... \n... ... ... \n... ... ... \n\n... ... ... \n... ... ... \n... x.. ... \n\n!!! ... ... \n!!! ... ... \n!!! ... ... \n\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\nThe new \"Die Hard\" movie has j... | [{"type": "stdin_stdout", "input": "14\n25 25 25 25 25 25 25 50 50 50 100 100 100 100\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "10\n100 100 100 100 100 100 100 100 100 100\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "10\n25 25 25 25 25 25 25 25 25 25\n", "output": "YES\n"}, {"type": "stdin_... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given a string s of leng... | [{"type": "stdin_stdout", "input": "10 30\naccbaaccac\n6 8 3\n2 9 1\n6 8 3\n10 5 1\n6 2 2\n1 4 7\n3 10 1\n6 9 1\n7 7 3\n7 3 2\n8 4 1\n4 9 1\n7 6 4\n6 8 2\n10 2 1\n1 3 5\n5 10 1\n7 10 1\n4 1 2\n8 5 3\n9 8 1\n8 6 2\n6 9 2\n10 3 1\n3 9 1\n5 5 5\n1 5 6\n4 2 6\n10 7 1\n9 8 2\n", "output": "NO\nYES\nNO\nYES\nNO\nNO\nYES\nYES... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nVadim is really keen on travelli... | [{"type": "stdin_stdout", "input": "50\n297 787 34 268 439 629 600 398 425 833 721 908 830 636 64 509 420 647 499 675 427 599 396 119 798 742 577 355 22 847 389 574 766 453 196 772 808 261 106 844 726 975 173 992 874 89 775 616 678 52 69 591 181 573 258 381 665 301 589 379 362 146 790 842 765 100 229 916 938 97 340 793... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 Petya likes arrays that c... | [{"type": "stdin_stdout", "input": "99\n3511 2076 9314 3598 7737 271 4110 4454 5830 8661 8584 8227 2236 2626 1025 3806 3162 2837 6071 9627 1836 7729 6629 4054 9377 3261 1325 8859 3610 7616 5052 9736 1249 6224 7031 6074 4196 8075 4005 5419 5664 8214 4391 731 8714 8622 6122 6976 4057 1770 8025 3778 2792 994 5204 1826 608... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 clique problem is one of the... | [{"type": "stdin_stdout", "input": "12\n66 4\n12 4\n60 4\n24 4\n48 4\n0 4\n36 4\n30 4\n6 4\n54 4\n42 4\n18 4\n", "output": "6\n"}, {"type": "stdin_stdout", "input": "11\n0 4\n54 4\n48 4\n18 4\n24 4\n42 4\n6 4\n36 4\n12 4\n30 4\n60 4\n", "output": "6\n"}, {"type": "stdin_stdout", "input": "10\n0 3\n30 3\n54 3\n6 3\n36 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\nPolycarpus has got n candies and... | [{"type": "stdin_stdout", "input": "100 100\n", "output": "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 "}, {"type": "stdin_stdout", "input": "100 99\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\nBob is a pirate looking for the ... | [{"type": "stdin_stdout", "input": "25\n2 2\n1 -2\n1 1\n0 1\n2 1\n-2 2\n-1 -2\n-1 2\n0 -2\n-1 1\n-2 -1\n-1 -1\n1 -1\n2 -1\n1 2\n-2 -2\n2 0\n-2 0\n-2 1\n2 -2\n-1 0\n1 0\n0 -1\n0 2\n0 0\n1 3\n-3 -1\n-2 0\n-3 1\n1 1\n0 0\n-2 2\n-1 -1\n1 -1\n-3 3\n0 3\n-2 1\n0 1\n-3 2\n-1 3\n-2 3\n-2 -1\n1 2\n1 0\n-3 0\n0 -1\n-1 2\n-1 1\n-... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nDo you like summer? Residents of... | [{"type": "stdin_stdout", "input": "10\n536259132 536259132 536259132 536259132 536259132 536259132 536259132 536259132 536259132 536259132\n", "output": "536259132 536259132 536259132 536259132 536259132 536259132 536259132 536259132 536259132 536259132 "}, {"type": "stdin_stdout", "input": "10\n876584065 876584063 87... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nGiven a string $s$ of length $n$... | [{"type": "stdin_stdout", "input": "92 5\nwwwwwwwwwwwwwwwwwgggggggggggggggbbbbyyyyyyyyyyyyyyjjjjjjjjjjjuuuuuuuuaaaaaaaaaaaafooooooooig\n", "output": "3\n"}, {"type": "stdin_stdout", "input": "83 2\njjjjjjjjjjjjjjjjjmmmmmmmmwwwwwwwwwwwcccccjjjjjjjppppppppppppccccccccqqqqqqqqqqktjkn\n", "output": "11\n"}, {"type": "stdin... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nInnovation technologies are on a... | [{"type": "stdin_stdout", "input": "10\n739 307\n523 658\n700 143\n373 577\n120 433\n353 833\n665 516\n988 101\n817 604\n800 551\n10\n431 425 227 147 153 170 954 757 222 759\n", "output": "6 3621\n6 2\n2 8\n9 7\n4 1\n7 10\n5 4\n"}, {"type": "stdin_stdout", "input": "9\n216 860\n299 720\n688 831\n555 733\n863 873\n594 9... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAyrat has number n, represented ... | [{"type": "stdin_stdout", "input": "67\n98929 19079 160079 181891 17599 91807 19079 98929 182233 92647 77477 98929 98639 182233 181891 182233 160079 98929 19079 98639 114941 98929 161341 91807 160079 22777 132361 92647 98929 77477 182233 103913 160079 77477 55711 77477 77477 182233 114941 91807 98929 19079 104393 18223... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nDoor's family is going celebrate... | [{"type": "stdin_stdout", "input": "21\n...CCC.....CC..C..C.C\n..CCC...CC...CC.CCC.C\n....C.C.C..CCC..C.C.C\n....CCC..C..C.CC.CCC.\n...CCC.C..C.C.....CCC\n.CCC.....CCC..C...C.C\nCCCC.C...CCC.C...C.CC\nC..C...C.CCC..CC..C..\nC...CC..C.C.CC..C.CC.\nCC..CCCCCCCCC..C....C\n.C..CCCC.CCCC.CCC...C\nCCC...CCC...CCC.C..C.\n.CCC... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 n friends met at a party... | [{"type": "stdin_stdout", "input": "10\n10 1000\n10 1000\n10 1000\n10 1000\n10 1000\n10 1000\n10 1000\n10 1000\n10 1000\n10 1000\n", "output": "90000 90000 90000 90000 90000 90000 90000 90000 90000 90000 "}, {"type": "stdin_stdout", "input": "10\n6 386\n9 816\n9 268\n9 481\n8 284\n10 715\n9 351\n7 580\n4 327\n7 392\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\nSasha and Ira are two best frien... | [{"type": "stdin_stdout", "input": "1000000\n", "output": "627314155\n"}, {"type": "stdin_stdout", "input": "999999\n", "output": "192151599\n"}, {"type": "stdin_stdout", "input": "524287\n", "output": "295397547\n"}, {"type": "stdin_stdout", "input": "131071\n", "output": "920253602\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\nQuite recently, a very smart stu... | [{"type": "stdin_stdout", "input": "1809 1302 7164 6122\n3144121413113111223311232232114144321414421243443243422322144324121433444342231344234443332241322442\n", "output": "420780\n"}, {"type": "stdin_stdout", "input": "50 50 50 50\n11111111111111111111111111111111111111111111111111111\n", "output": "2650\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\nNam is playing with a string on ... | [{"type": "stdin_stdout", "input": "198 3\ntuxqalctjyegbvouezfiqoeoazizhmjhpcmvyvjkyrgxkeupwcmvzcosdrrfgtdmxwfttxjxsbaspjwftgpnvsfyfqsrmyjmypdwonbzwsftepwtjlgbilhcsqyfzfzrfvrvfqiwoemthwvqptqnflqqspvqrnmvucnspexpijnivqpavqxjyucufcullevaedlvut\n", "output": "692\n"}, {"type": "stdin_stdout", "input": "167 152\nvqgjxbuxev... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nFor a positive integer X, let f(... | [{"type": "stdin_stdout", "input": "10000000\n", "output": "838627288460105\n"}, {"type": "stdin_stdout", "input": "9999991\n", "output": "838625848460453\n"}, {"type": "stdin_stdout", "input": "7914575\n", "output": "517994416125999\n"}, {"type": "stdin_stdout", "input": "9999985\n", "output": "838622848463579\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\nDolphin is planning to generate ... | [{"type": "stdin_stdout", "input": "40 3 8\n9 1 80\n7 8 13\n1 4 64\n5 2 60\n10 10 84\n5 6 64\n2 10 43\n9 2 73\n8 3 43\n8 2 53\n10 10 26\n4 4 20\n4 10 82\n9 7 96\n4 6 15\n1 3 45\n6 7 53\n3 3 92\n7 7 74\n4 2 62\n8 4 68\n3 7 7\n5 4 73\n5 10 22\n3 5 37\n2 10 88\n3 9 74\n1 7 80\n3 6 20\n7 9 5\n6 2 79\n9 9 20\n1 10 100\n9 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\nYou are given an integer N. Amon... | [{"type": "stdin_stdout", "input": "100\n", "output": "543\n"}, {"type": "stdin_stdout", "input": "52\n", "output": "123\n"}, {"type": "stdin_stdout", "input": "54\n", "output": "131\n"}, {"type": "stdin_stdout", "input": "77\n", "output": "323\n"}, {"type": "stdin_stdout", "input": "78\n", "output": "324\n"}, {"type":... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere are $n$ students and $m$ c... | [{"type": "stdin_stdout", "input": "20 20\n0 0 3 2 1 2 2 3 2 2 1 1 0 3 0 0 1 1 1 3\n15 1 20 13 6 12 16 8 3 14 10 5 18 17 4 9 2 11 7 19\n20\n2\n10\n7\n4\n6\n5\n14\n8\n9\n18\n13\n11\n19\n1\n16\n20\n17\n12\n15\n3\n", "output": "4\n4\n4\n4\n4\n4\n4\n4\n2\n2\n2\n2\n2\n2\n2\n2\n2\n1\n0\n0\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\nEvery evening Vitalya sets n ala... | [{"type": "stdin_stdout", "input": "100 40 20\n148 120 37 65 188 182 199 131 97 174 157 113 62 63 193 8 72 152 138 5 90 48 133 83 197 118 123 2 181 151 53 115 78 177 144 33 196 19 85 104 77 34 173 198 136 44 3 22 86 200 23 129 68 176 29 58 121 56 79 15 159 183 171 60 141 54 158 106 30 17 116 105 190 59 36 46 169 142 16... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAnd where the are the phone numb... | [{"type": "stdin_stdout", "input": "10 10\nmrfkcsxcuj\n", "output": "mrfkcsxcuk\n"}, {"type": "stdin_stdout", "input": "10 9\nbcegikmyyy\n", "output": "bcegikybb\n"}, {"type": "stdin_stdout", "input": "10 7\nffffffffyf\n", "output": "ffffffy\n"}, {"type": "stdin_stdout", "input": "8 9\npppppppp\n", "output": "ppppppppp... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 likes taking part in Codef... | [{"type": "stdin_stdout", "input": "100 10\n3 114 77 78 105 87 6 122 141 100 75 118 64 18 88 37 109 72 31 101 36 10 62 18 52 17 149 115 22 150 138 48 46 42 104 8 63 21 117 58 87 80 7 131 125 118 67 13 144 43 59 67 74 13 124 77 86 148 107 11 51 9 87 52 147 22 7 22 143 12 121 123 17 35 33 87 91 140 92 38 106 10 66 26 40 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nMoscow is hosting a major intern... | [{"type": "stdin_stdout", "input": "20\n2 2 1 6 6 5 10 2 5 5 4 8 6 8 8 10 2 1 5 6\n20\n1 9 1 1 5 1 9 10 1 10 9 9 8 7 5 1 1 10 2 7\n3 5 9 10 10 8 2 9 6 7 8 8 6 5 3 4 6 3 7 4\n", "output": "5\n"}, {"type": "stdin_stdout", "input": "10\n7 6 1 2 7 3 9 7 7 9\n10\n2 9 6 5 9 3 10 3 1 6\n4 6 7 9 7 4 1 9 2 5\n", "output": "5\n"... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given a permutation p of... | [{"type": "stdin_stdout", "input": "8 127\n", "output": "7 8 6 5 4 3 2 1 \n"}, {"type": "stdin_stdout", "input": "8 128\n", "output": "8 7 6 5 4 3 2 1 \n"}, {"type": "stdin_stdout", "input": "8 1\n", "output": "1 2 3 4 5 6 7 8 \n"}, {"type": "stdin_stdout", "input": "7 44\n", "output": "2 4 7 6 5 3 1 \n"}, {"type": "st... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nMonocarp has arranged $n$ colore... | [{"type": "stdin_stdout", "input": "100\n11 16 16 11 16 11 16 16 11 16 16 16 16 16 16 16 16 16 11 16 16 16 16 16 16 11 16 11 16 11 16 16 16 11 5 16 16 11 16 16 16 16 16 11 16 11 5 16 16 16 16 5 16 16 11 11 16 16 5 16 11 11 16 16 16 11 11 16 11 16 16 16 16 16 16 11 11 16 16 5 16 5 20 5 16 16 16 11 16 16 16 16 16 16 11 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\nMasha wants to open her own bake... | [{"type": "stdin_stdout", "input": "8 57 3\n1 3 15\n2 3 1\n1 7 21\n1 2 8\n2 5 16\n1 6 4\n1 3 2\n3 7 17\n5 8 3\n1 3 18\n1 4 3\n1 2 1\n2 8 14\n1 4 17\n4 5 21\n2 3 6\n3 5 11\n2 8 11\n3 4 1\n1 3 9\n1 4 3\n2 3 12\n1 5 9\n2 3 15\n1 2 14\n1 2 10\n1 4 19\n5 7 7\n5 8 20\n5 8 1\n1 4 3\n4 5 8\n5 7 2\n1 2 14\n4 5 9\n6 7 2\n2 6 9\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 array consisting o... | [{"type": "stdin_stdout", "input": "10\n802030518 598196518 640274071 983359971 71550121 96204862 799843967 446173607 796619138 402690754\n", "output": "3\n"}, {"type": "stdin_stdout", "input": "6\n100 100 100 100 100 100\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "11\n1 2 3 1 2 3 2 1 2 3 4\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\nVasya has found a piece of paper... | [{"type": "stdin_stdout", "input": "48\n4 7 12 16 23 43 61 112 134 141 243 267 484 890 1427 1558 1653 2263 2889 3313 3730 5991 10176 18243 18685 36555 40006 62099 70557 106602 122641 125854 213236 309698 379653 713328 999577 1021356 2007207 2886237 4994645 5812125 11576387 14215887 26060277 35989707 36964781 57933366\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\nIt is Professor R's last class o... | [{"type": "stdin_stdout", "input": "70 11 17929\n17929 427 268935 211 197219 83 357 179290 97 358580 475 343 175 221 286864 429 304793 179290 189 363 221 340651 376509 453 251006 141 304793 358580 235 107574 141 358580 167 181 304793 335 286864 171 107574 105 449 358580 286864 161 286864 349 89645 197219 395 358580 233... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 you had helped Fedor to fi... | [{"type": "stdin_stdout", "input": "2\nABBABAABBAABABBABAABABBAABBABAABBAABABBAABBABAABABBABAABBAABABBA ABBABAABBAABABBABAABABBAABBABAABBAABABBAABBABAABABBABAABBAABABA\n2\nABBABAABBAABABBABAABABBAABBABAABBAABABBAABBABAABABBABAABBAABABA neuzaiheshi\nABBABAABBAABABBABAABABBAABBABAABBAABABBAABBABAABABBABAABBAABABBA ABBABA... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 had an undirected connect... | [{"type": "stdin_stdout", "input": "9 4\n2 1 1 3 1 2 2 1 0\n", "output": "8\n1 8\n2 9\n3 9\n4 7\n5 9\n6 8\n7 8\n8 9\n"}, {"type": "stdin_stdout", "input": "7 3\n2 2 0 1 3 2 1\n", "output": "6\n1 7\n2 7\n3 4\n3 7\n4 6\n5 6\n"}, {"type": "stdin_stdout", "input": "5 3\n0 2 1 2 1\n", "output": "4\n1 3\n1 5\n2 5\n4 5\n"}, {... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIt is winter now, and Max decide... | [{"type": "stdin_stdout", "input": "1\n177 99\n1 4 7 10 11 13 14 15 16 17 19 21 22 24 25 26 27 28 32 34 35 38 39 40 42 45 46 52 54 55 57 58 59 60 62 64 65 67 70 71 74 77 78 79 80 81 83 84 88 92 93 94 95 100 101 102 104 106 107 108 109 110 112 113 114 115 116 118 122 123 124 125 127 128 129 130 134 135 137 138 139 140 1... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given a string $s$ of le... | [{"type": "stdin_stdout", "input": "76 26\nABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYABCDEFGHIJKLMNOPQRSTUVWXY\n", "output": "26"}, {"type": "stdin_stdout", "input": "22 1\nAAAAAAAAAAAAAAAAAAAAAA\n", "output": "22"}, {"type": "stdin_stdout", "input": "15 26\nWEYYDIADTLCOUEG\n", "output": "0"}, {"type": "stdin_... | code_stdio |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.