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\nРодители Васи хотят, чтобы он ка...
[{"type": "stdin_stdout", "input": "250\n4 4 2 5 1 5 5 4 5 4 4 4 4 4 4 5 5 4 4 5 4 5 1 5 5 4 1 5 5 4 5 5 4 4 4 4 5 4 4 5 5 5 5 5 4 5 4 5 5 4 5 4 4 4 4 4 4 5 5 4 5 5 1 4 4 4 5 1 5 3 4 5 4 4 4 4 4 5 5 4 4 4 4 4 5 4 5 5 5 4 4 5 4 4 4 5 5 5 5 4 5 4 5 4 5 5 5 5 4 4 4 4 5 5 5 5 5 5 4 4 3 4 4 5 5 3 5 4 4 4 4 4 4 5 5 5 4 5 4 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\nValera is a little boy. Yesterda...
[{"type": "stdin_stdout", "input": "15\nrxeeeeeeeeeeeer\nereeeeeeeeeeere\needeeeeeeeeeoee\neeereeeeeeeewee\neeeereeeeebeeee\nqeeeereeejedyee\neeeeeerereeeeee\neeeeeeereeeeeee\neeeeeerereeeeze\neeeeereeereeeee\neeeereeeeegeeee\neeereeeeeeereee\neereeeeeeqeeved\ncreeeeeeceeeere\nreeerneeeeeeeer\n", "output": "NO\n"}, {"t...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAlice got an array of length $n$...
[{"type": "stdin_stdout", "input": "5 12\n634 895\n143 730\n901 245\n386 486\n395 -111\n-469 -104\n-681 -623\n-900 843\n889 -883\n476 -304\n777 986\n206 -491\n", "output": "8107.800000000000182\n"}, {"type": "stdin_stdout", "input": "85 10\n-223 435\n-771 455\n72 -940\n490 -178\n400 -117\n169 -527\n836 610\n849 944\n57...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nDevu being a small kid, likes to...
[{"type": "stdin_stdout", "input": "30 24 12\n459253071 24156 64054 270713791 734796619 379920883 429646748 332144982 20929 27685 53253 82047732 172442017 34241 880121331 890223629 974692 954036632 68638567 972921811 421106382 64615 819330514 179630214 608594496 802986133 231010377 184513476 73143 93045\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 is studying in the last cl...
[{"type": "stdin_stdout", "input": "1000000000000000000 1000000000000000000 1000000000000000000\n", "output": "2\n"}, {"type": "stdin_stdout", "input": "1000000000000 1000000000000000 1000000000000000000\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "1 1000000000000000000 1000000000000000000\n", "output": "1\...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAfter several latest reforms man...
[{"type": "stdin_stdout", "input": "70 203\n1 105\n1 105\n1 105\n3 300\n3 300\n3 300\n3 300\n3 300\n3 300\n3 300\n3 300\n3 300\n3 300\n3 300\n3 300\n3 300\n3 300\n3 300\n3 300\n3 300\n3 300\n3 300\n3 300\n3 300\n3 300\n3 300\n3 300\n3 300\n3 300\n3 300\n3 300\n3 300\n3 300\n3 300\n3 300\n3 300\n3 300\n3 300\n3 300\n3 3...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSnuke has an integer sequence A ...
[{"type": "stdin_stdout", "input": "5574\n150872158 2 6 1 3 8 10 4 9 3 5 2 10 2 8 4 2 3 10 8 4 3 1 8 3 5 8 3 7 3 10 7 4 6 1 1 8 10 1 1 10 9 7 9 1 3 7 7 8 6 7 8 6 10 5 2 1 2 2 2 6 10 3 6 6 2 8 1 9 3 6 8 10 10 5 1 8 4 5 1 6 2 7 7 5 3 6 10 6 9 2 9 9 10 1 10 9 10 5 3 10 8 6 10 2 3 1 7 2 7 2 5 8 7 10 3 10 4 1 2 2 1 2 9 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\nKsenia has ordinary pan scales a...
[{"type": "stdin_stdout", "input": "CKQHRUZMISGE|FBVWPXDLTJYN\nOA\n", "output": "CKQHRUZMISGEA|FBVWPXDLTJYNO\n"}, {"type": "stdin_stdout", "input": "V|CMOEUTAXBFWSK\nDLRZJGIYNQHP\n", "output": "VDLRZJGIYNQHP|CMOEUTAXBFWSK\n"}, {"type": "stdin_stdout", "input": "QWHNMALDGKTJ|\nPBRYVXZUESCOIF\n", "output": "QWHNMALDGKTJF...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 after the Chunga-Changa isl...
[{"type": "stdin_stdout", "input": "500000000000000000 500000000000000000 1000000000000000000\n", "output": "1 500000000000000000\n"}, {"type": "stdin_stdout", "input": "582426543750017 789023129080207 4395672028302\n", "output": "312 2197836014149\n"}, {"type": "stdin_stdout", "input": "1000000000000000000 10000000000...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLong time ago Alex created an in...
[{"type": "stdin_stdout", "input": "1000 1000\n-1000 -1000\n-1000 1000\n", "output": "3\n1000 -1000\n1000 3000\n-3000 -1000\n"}, {"type": "stdin_stdout", "input": "-1000 1000\n1000 -1000\n-1000 -1000\n", "output": "3\n1000 1000\n-3000 1000\n1000 -3000\n"}, {"type": "stdin_stdout", "input": "1000 1000\n999 1000\n-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\nPolycarpus has been working in t...
[{"type": "stdin_stdout", "input": "12\n1 -12 -5 -8 0 -8 -1 -1 -6 12 -9 12\n", "output": "4\n3 3 2 4 "}, {"type": "stdin_stdout", "input": "10\n-2 -4 -1 -6 -5 -5 -7 0 -7 -8\n", "output": "5\n1 2 2 2 3 "}, {"type": "stdin_stdout", "input": "10\n6 5 -10 -4 -3 -7 5 -2 -6 -10\n", "output": "4\n3 2 3 2 "}, {"type": "stdin_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\nFriends are going to play consol...
[{"type": "stdin_stdout", "input": "100 100\n", "output": "197\n"}, {"type": "stdin_stdout", "input": "100 25\n", "output": "122\n"}, {"type": "stdin_stdout", "input": "59 45\n", "output": "102\n"}, {"type": "stdin_stdout", "input": "85 73\n", "output": "155\n"}, {"type": "stdin_stdout", "input": "1 100\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\nEvery superhero has been given a...
[{"type": "stdin_stdout", "input": "9 48096 5475634\n28248 27808 75072 58867 37890 95515 26685 68307 40390\n", "output": "143611.00000000000000000000\n"}, {"type": "stdin_stdout", "input": "9 29221 2106895\n82089 18673 2890 99009 89855 30685 39232 82330 30021\n", "output": "128230.00000000000000000000\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\nFor a positive integer n let's d...
[{"type": "stdin_stdout", "input": "1000000000000000\n", "output": "500000000000000\n"}, {"type": "stdin_stdout", "input": "999999999999999\n", "output": "-500000000000000\n"}, {"type": "stdin_stdout", "input": "208170109961052\n", "output": "104085054980526\n"}, {"type": "stdin_stdout", "input": "99999999999999\n", "o...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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$ consi...
[{"type": "stdin_stdout", "input": "26\nlolthisiscoolfreehackforya\n", "output": "llthisiscoolfreehackforya\n"}, {"type": "stdin_stdout", "input": "18\nfjwhrwehrjwhjewhrr\n", "output": "fjhrwehrjwhjewhrr\n"}, {"type": "stdin_stdout", "input": "10\naaaaaaaaab\n", "output": "aaaaaaaaa\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\nMr Keks is a typical white-colla...
[{"type": "stdin_stdout", "input": "30 4\n893642632982367 772277951746295 510759449350295 826812150840579 1060893142351815 525992742241552 154832018679993 645715002371268 27232975419720 475004229372388 200177708355593 810661468479466 49618609534806 301608930846726 97042172725806 441637617418914 594900693592862 62651070...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 little boy Laurenty has been p...
[{"type": "stdin_stdout", "input": "50\n31 80 40 85 12 38 30 97 51 18 45 81 56 82 91 94 95 13 26 93 98 35 44 69 98 39 83 77 38 68 13 71 80 41 21 80 81 17 88 46 61 67 65 49 29 55 37 74 88\n71 8 42 74 14 70 100 96 25 56 95 38 41 88 45 43 46 16 55 77 100 68 51 30 73 51 25 88 64 26 22 50 4 57 88 85 45 32 11 96 94 19 9 12 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 times you recall a goo...
[{"type": "stdin_stdout", "input": "100 5\n0 1 1 1 0 5 6 6 8 8 9 11 12 11 8 0 0 14 6 16 7 21 15 23 15 24 0 0 0 28 0 29 26 27 19 0 0 21 37 32 40 30 37 34 39 38 34 38 0 0 41 24 45 47 0 33 46 26 31 0 21 57 57 31 63 63 25 59 65 56 68 0 30 55 55 0 70 43 59 49 59 79 66 74 0 11 65 0 80 63 0 84 73 49 73 81 0 86 76 98\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\nFor a given array $a$ consisting...
[{"type": "stdin_stdout", "input": "5\n4 10\n5 5 5 5\n3 5\n5 5 5\n3 4\n10 1 1\n4 5\n5 5 5 5\n5 5\n5 5 5 5 5\n", "output": "NO\nNO\nNO\nNO\nNO\n"}, {"type": "stdin_stdout", "input": "2\n4 5\n5 5 5 5\n6 3\n3 3 3 3 3 3\n", "output": "NO\nNO\n"}, {"type": "stdin_stdout", "input": "2\n3 18\n3 3 3\n4 26\n10 10 2 4\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\nOrac is studying number theory, ...
[{"type": "stdin_stdout", "input": "5\n497347 19283\n2568 1000000000\n499979 123987\n93 19\n13 5\n", "output": "536584\n2000002568\n1247930\n132\n34\n"}, {"type": "stdin_stdout", "input": "1\n999995 1000000000\n", "output": "2000999998\n"}, {"type": "stdin_stdout", "input": "1\n999991 999999999\n", "output": "200100000...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 undirected graph $...
[{"type": "stdin_stdout", "input": "10 31\n", "output": "Possible\n1 2\n2 3\n3 4\n4 5\n5 6\n6 7\n7 8\n8 9\n9 10\n1 3\n1 4\n1 5\n2 5\n3 5\n1 6\n1 7\n2 7\n3 7\n4 7\n5 7\n1 8\n3 8\n5 8\n1 9\n2 9\n4 9\n5 9\n7 9\n1 10\n3 10\n7 10\n"}, {"type": "stdin_stdout", "input": "5 6\n", "output": "Possible\n1 2\n2 3\n3 4\n4 5\n1 3\n1...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn a far away land, there are tw...
[{"type": "stdin_stdout", "input": "100 44\n41 1\n13 1\n52 1\n83 1\n64 2\n86 2\n12 1\n77 1\n100 2\n97 2\n58 1\n33 2\n8 1\n72 2\n2 1\n88 1\n50 2\n4 1\n18 1\n36 2\n46 2\n57 1\n29 2\n22 1\n75 2\n44 2\n80 2\n84 1\n62 1\n42 1\n94 1\n96 2\n31 2\n45 2\n10 2\n17 1\n5 1\n53 1\n98 2\n21 1\n82 1\n15 1\n68 2\n91 1\n", "output": "W...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAlice has a birthday today, so s...
[{"type": "stdin_stdout", "input": "10 10\n1 0 0 0 0 0 0 0 0 1\n0 0 0 0 0 0 0 0 0 0\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "10 2\n1 0 0 1 0 1 1 0 1 1\n1 1 1 0 1 0 0 1 0 1\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "10 3\n1 0 0 1 0 0 0 1 1 0\n1 1 1 1 0 0 1 0 0 1\n", "output": "YES\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 camera you have accidentally l...
[{"type": "stdin_stdout", "input": "100\n1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "50\n0 0 0 0 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\nThe only difference between easy...
[{"type": "stdin_stdout", "input": "100 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...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nDr. Evil kidnapped Mahmoud and E...
[{"type": "stdin_stdout", "input": "100 100\n58 88 12 71 22 1 40 19 73 20 67 48 57 17 69 36 100 35 33 37 72 55 52 8 89 85 47 42 78 70 81 86 11 9 68 99 6 16 21 61 53 98 23 62 32 59 51 0 87 24 50 30 65 10 80 95 7 92 25 74 60 79 91 5 13 31 75 38 90 94 46 66 93 34 14 41 28 2 76 84 43 96 3 56 49 82 27 77 64 63 4 45 18 29 54...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 players are playing a game. ...
[{"type": "stdin_stdout", "input": "2 5\n", "output": "3 0 3\n"}, {"type": "stdin_stdout", "input": "2 4\n", "output": "2 1 3\n"}, {"type": "stdin_stdout", "input": "5 3\n", "output": "2 1 3\n"}, {"type": "stdin_stdout", "input": "1 6\n", "output": "3 0 3\n"}, {"type": "stdin_stdout", "input": "5 1\n", "output": "3 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\nToday is Wednesday, the third da...
[{"type": "stdin_stdout", "input": "30 of month\n", "output": "11\n"}, {"type": "stdin_stdout", "input": "17 of month\n", "output": "12\n"}, {"type": "stdin_stdout", "input": "10 of month\n", "output": "12\n"}, {"type": "stdin_stdout", "input": "11 of month\n", "output": "12\n"}, {"type": "stdin_stdout", "input": "12 o...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 Petya loves stairs ve...
[{"type": "stdin_stdout", "input": "500 50\n72 474 467 241 442 437 336 234 410 120 438 164 405 177 142 114 27 20 445 235 46 176 88 488 242 391 28 414 145 92 206 334 152 343 367 254 100 243 155 348 148 450 461 483 97 34 471 69 416 362\n", "output": "NO"}, {"type": "stdin_stdout", "input": "50 40\n14 27 19 30 31 20 28 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\nYou are an experienced Codeforce...
[{"type": "stdin_stdout", "input": "5\n99999997 999999998 999999998 999999999\n99999996 999999997 999999997 999999999\n99999997 999999998 999999998 999999999\n99999996 999999997 999999997 999999999\n99999997 999999998 999999998 999999999\n", "output": "899999999100000001\n449999999550000002\n899999999100000001\n4499999...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 function $f$ wri...
[{"type": "stdin_stdout", "input": "83\nadd\nfor 58\nend\nadd\nadd\nfor 36\nfor 84\nadd\nadd\nfor 86\nadd\nadd\nend\nend\nadd\nadd\nadd\nadd\nfor 23\nadd\nadd\nadd\nfor 70\nadd\nadd\nend\nfor 24\nfor 58\nend\nadd\nend\nend\nend\nfor 41\nfor 51\nend\nfor 22\nfor 39\nend\nfor 94\nfor 47\nadd\nfor 57\nend\nadd\nend\nfor 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\nYour friend has n cards.\n\nYou ...
[{"type": "stdin_stdout", "input": "01234567890123456789012345678901234567890123456789\n", "output": "25\n"}, {"type": "stdin_stdout", "input": "qwertyuioplkjhgfdsazxcvbnmqwertyuioplkjhgfdsazxcvb\n", "output": "10\n"}, {"type": "stdin_stdout", "input": "kaq7jyialrfp4ilkni90eq8v3amcbygon7py0hb8z26fbl8ss1\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$ detachments on the...
[{"type": "stdin_stdout", "input": "23\n-1000000000 -964752353\n-967012509 -1000000000\n34021744 1000000000\n-931956512 -34021744\n-1034253 967204159\n-1034253 -34021744\n-1034253 -1000000000\n-931956512 -1000000000\n-967012509 1000000000\n964944003 1225903\n1000000000 1225903\n-967012509 1225903\n-1034253 -964752353\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\nOne fine October day a mathemati...
[{"type": "stdin_stdout", "input": "74\nRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR\n", "output": "1 38\n2 39\n3 40\n4 41\n5 42\n6 43\n7 44\n8 45\n9 46\n10 47\n11 48\n12 49\n13 50\n14 51\n15 52\n16 53\n17 54\n18 55\n19 56\n20 57\n21 58\n22 59\n23 60\n24 61\n25 62\n26 63\n27 64\n28 65\n29 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nOkabe needs bananas for one of h...
[{"type": "stdin_stdout", "input": "1000 10000\n", "output": "74133360011484445\n"}, {"type": "stdin_stdout", "input": "859 8096\n", "output": "29032056230649780\n"}, {"type": "stdin_stdout", "input": "539 9221\n", "output": "16893595018603386\n"}, {"type": "stdin_stdout", "input": "918 7704\n", "output": "285697273391...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nOne tradition of welcoming the N...
[{"type": "stdin_stdout", "input": "30\n1 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5\n", "output": "43348\n"}, {"type": "stdin_stdout", "input": "30\n5 5 1 1 4 4 3 1 5 3 5 5 1 2 2 3 4 5 2 1 4 3 1 1 4 5 4 4 2 2\n", "output": "24339\n"}, {"type": "stdin_stdout", "input": "30\n2 2 2 2 2 2 2 2 2 2 2 2 2 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\n-----Input-----\n\nThe input con...
[{"type": "stdin_stdout", "input": "ALKALINITY\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "UNSCRAMBLE\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "APRILFOOL\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "SOURPUSS\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "VITALIZE\...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 a plan...
[{"type": "stdin_stdout", "input": "20\n0 17\n1 8\n1 9\n2 5\n2 11\n3 0\n5 10\n5 13\n6 7\n7 3\n12 13\n13 7\n14 16\n15 10\n15 18\n17 2\n17 12\n18 14\n19 18\n20 17\n", "output": "18\n"}, {"type": "stdin_stdout", "input": "10\n2 14\n5 9\n10 16\n12 5\n16 19\n26 23\n30 37\n32 26\n37 33\n40 28\n", "output": "10\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\nAmugae has a hotel consisting of...
[{"type": "stdin_stdout", "input": "100\nR9L0L0R9R9L0R9R9L0R9R9R9L0R9R9R9L0L0R9L0R9L0L0L0R9R9L0R9L0R9R9L0R9R9L0R9L0L0R9R9R9L0L0L0L0R9L0L0L0L0\n", "output": "0000000000"}, {"type": "stdin_stdout", "input": "100\nRRLRRLRRLR2L0R6R2L1L3R4L0L6L2L2R5R6R1R3L6R6R8L6L4L3L6R9L6L9L8L7R7L8R1R1R7R7L2L8L2L1R8R2R8L76RR9R4R3R\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\nNeko is playing with his toys on...
[{"type": "stdin_stdout", "input": "1000\n", "output": "143886430\n"}, {"type": "stdin_stdout", "input": "450\n", "output": "690479399\n"}, {"type": "stdin_stdout", "input": "999\n", "output": "742390865\n"}, {"type": "stdin_stdout", "input": "900\n", "output": "454329300\n"}, {"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\nOn a chessboard with a width of ...
[{"type": "stdin_stdout", "input": "1000000000000000000\n1000000000000000000 1000000000000000000\n", "output": "Black"}, {"type": "stdin_stdout", "input": "1000000000000000000\n500000000000000001 500000000000000001\n", "output": "Black"}, {"type": "stdin_stdout", "input": "839105509657869903\n591153401407154876 2587549...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 winter in Berland lasts n da...
[{"type": "stdin_stdout", "input": "100 50\n-7 -3 9 2 16 -19 0 -10 3 -11 17 7 -7 -10 -14 -14 -7 -15 -15 -8 8 -18 -17 -5 -19 -15 -14 0 8 -3 -19 -13 -3 11 -3 -16 16 -16 -12 -2 -17 7 -16 -14 -10 0 -10 -18 -16 -11 -2 -12 -15 -8 -1 -11 -3 -17 -14 -6 -9 -15 -14 -11 -20 -20 -4 -20 -8 -2 0 -2 -20 17 -17 2 0 1 2 6 -5 -13 -16 -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\nDuring the winter holidays, the ...
[{"type": "stdin_stdout", "input": "1000000000 1000000000\n1000000000 1000000000 1000000000\n", "output": "5000000000\n"}, {"type": "stdin_stdout", "input": "626115781 966381948\n395190569 820194184 229233367\n", "output": "1525971878\n"}, {"type": "stdin_stdout", "input": "803372962 103701834\n394260597 837711458 6231...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 while Mishka is enjoying her...
[{"type": "stdin_stdout", "input": "10 1000 505 223\n1564 401\n1689 158\n2078 1\n2428 168\n2477 767\n2424 836\n1929 984\n1906 978\n1764 907\n1723 875\n", "output": "8.5946721130"}, {"type": "stdin_stdout", "input": "10 1000 10 2\n2731 286\n3154 1\n3590 210\n3674 406\n3667 625\n3546 844\n3275 991\n3154 999\n2771 783\n27...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 of int...
[{"type": "stdin_stdout", "input": "4\n562617869 961148050 596819899 951133776\n", "output": "1 2\n"}, {"type": "stdin_stdout", "input": "4\n562617869 596819899 951133776 961148050\n", "output": "1 2\n"}, {"type": "stdin_stdout", "input": "4\n961148050 951133776 596819899 562617869\n", "output": "1 2\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\nConstruct a sequence a = {a_1,\\...
[{"type": "stdin_stdout", "input": "17 1000000000\n", "output": ""}, {"type": "stdin_stdout", "input": "0 1000000000\n", "output": ""}, {"type": "stdin_stdout", "input": "1 1000000000\n", "output": ""}, {"type": "stdin_stdout", "input": "2 1000000000\n", "output": ""}, {"type": "stdin_stdout", "input": "14 894437032\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\nAlex, Bob and Carl will soon par...
[{"type": "stdin_stdout", "input": "100\n2\n3\n1\n2\n3\n3\n3\n1\n1\n1\n1\n3\n3\n3\n3\n1\n2\n3\n3\n3\n3\n3\n3\n3\n1\n2\n2\n2\n3\n1\n1\n3\n3\n3\n3\n3\n3\n3\n3\n1\n2\n3\n3\n3\n1\n1\n1\n1\n3\n3\n3\n3\n1\n2\n3\n1\n2\n2\n2\n3\n3\n2\n1\n3\n3\n1\n2\n3\n1\n1\n1\n2\n2\n2\n3\n1\n1\n1\n1\n1\n1\n3\n2\n2\n2\n2\n2\n2\n3\n1\n2\n2\n2\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\nAmr loves Geometry. One day he c...
[{"type": "stdin_stdout", "input": "100000 -100000 -100000 100000 100000\n", "output": "2\n"}, {"type": "stdin_stdout", "input": "1 100000 100000 100000 -100000\n", "output": "100000\n"}, {"type": "stdin_stdout", "input": "249 -54242 -30537 -45023 -89682\n", "output": "121\n"}, {"type": "stdin_stdout", "input": "67377 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nNew Year is coming! Vasya has pr...
[{"type": "stdin_stdout", "input": "1\n50 1\n2 1 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 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\nConsider the infinite sequence o...
[{"type": "stdin_stdout", "input": "100000000000000\n", "output": "1749820\n"}, {"type": "stdin_stdout", "input": "99999998250180\n", "output": "14142135\n"}, {"type": "stdin_stdout", "input": "999999911791\n", "output": "1414213\n"}, {"type": "stdin_stdout", "input": "1000000000000\n", "output": "88209\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 are given a complete undirec...
[{"type": "stdin_stdout", "input": "10\n0 1 100 100 100 100 100 100 100 100\n1 0 1 100 100 100 100 100 100 100\n100 1 0 1 100 100 100 100 100 100\n100 100 1 0 1 100 100 100 100 100\n100 100 100 1 0 1 100 100 100 100\n100 100 100 100 1 0 1 100 100 100\n100 100 100 100 100 1 0 1 100 100\n100 100 100 100 100 100 1 0 1 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\nPolycarp studies at the universi...
[{"type": "stdin_stdout", "input": "65\n3 0 0 0 0 3 0 0 0 0 0 4 2 0 0 0 0 0 0 0 0 8 0 0 0 0 0 6 7 0 3 0 0 0 0 4 0 3 0 0 0 0 1 0 0 5 0 0 0 0 3 0 0 4 0 0 0 0 0 1 0 0 0 0 7\n", "output": "64\n1 22\n1 29\n1 65\n22 28\n22 46\n22 12\n22 36\n22 54\n22 6\n22 31\n22 38\n29 51\n29 13\n29 43\n29 60\n29 2\n29 3\n29 4\n65 5\n65 7\n...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given an array a consist...
[{"type": "stdin_stdout", "input": "35 1000000000\n723631245 190720106 931659134 503095294 874181352 712517040 800614682 904895364 256863800 39366772 763190862 770183843 774794919 55669976 329106527 513566505 207828535 258356470 816288168 657823769 5223226 865258331 655737365 278677545 880429272 718852999 810522025 229...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn this problem we consider a ve...
[{"type": "stdin_stdout", "input": "664808710 -309024147 997224520\n-417682067 -256154660 -762795849 -292925742\n", "output": "381884864.0000000000\n"}, {"type": "stdin_stdout", "input": "912738218 530309782 -939253776\n592805323 -930297022 -567581994 -829432319\n", "output": "1218437463.3854324267\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\nEvery year, hundreds of people c...
[{"type": "stdin_stdout", "input": "1000\n", "output": "3\n"}, {"type": "stdin_stdout", "input": "999\n", "output": "9\n"}, {"type": "stdin_stdout", "input": "100\n", "output": "5\n"}, {"type": "stdin_stdout", "input": "123\n", "output": "6\n"}, {"type": "stdin_stdout", "input": "157\n", "output": "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\nLast week, Hamed learned about a...
[{"type": "stdin_stdout", "input": "1000000000 1000000000\n", "output": "infinity\n"}, {"type": "stdin_stdout", "input": "1000000000 333333300\n", "output": "2\n"}, {"type": "stdin_stdout", "input": "772930485 686893955\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "295138437 589952171\n", "output": "0\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\nJohny likes numbers n and k very...
[{"type": "stdin_stdout", "input": "1000000000 1000000000\n", "output": "2000000000\n"}, {"type": "stdin_stdout", "input": "1000000000 999999999\n", "output": "1999999998\n"}, {"type": "stdin_stdout", "input": "999999999 1000000000\n", "output": "1000000000\n"}, {"type": "stdin_stdout", "input": "1000000000 999999997\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 substring of some string is ca...
[{"type": "stdin_stdout", "input": "76\namnctposz\nmnctpos\nos\nu\ne\nam\namnc\neamnctpo\nl\nx\nq\nposzq\neamnc\nctposzq\nctpos\nmnc\ntpos\namnctposzql\ntposzq\nmnctposz\nnctpos\nctposzql\namnctpos\nmnct\np\nux\nposzql\ntpo\nmnctposzql\nmnctp\neamnctpos\namnct\ntposzql\nposz\nz\nct\namnctpo\noszq\neamnct\ntposz\ns\nmn\...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAnya loves to watch horror movie...
[{"type": "stdin_stdout", "input": "138 245 30\n3 5 6 8 9 13 15 16 19 20 24 25 27 29 30 32 33 34 35 36 37 38 40 42 47 51 52 53 55 56 58 59 63 66 67 68 69 72 73 74 75 77 78 80 81 82 85 86 87 89 91 93 95 96 99 100 102 104 105 108 110 111 112 117 122 124 125 128 129 131 133 136 139 144 145 146 147 148 149 151 153 155 156 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 an old tradition of kee...
[{"type": "stdin_stdout", "input": "1\n500\n", "output": "YES\n500\n1500\n1500\n"}, {"type": "stdin_stdout", "input": "2\n500\n497\n", "output": "YES\n1491\n1488\n"}, {"type": "stdin_stdout", "input": "1\n125\n", "output": "YES\n125\n375\n375\n"}, {"type": "stdin_stdout", "input": "1\n190\n", "output": "YES\n190\n570\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 $q$ queries in the...
[{"type": "stdin_stdout", "input": "30\n1 1000000000 1\n1 1000000000 1\n1 1000000000 1\n1 1000000000 1\n1 1000000000 1\n1 1000000000 1\n1 1000000000 1\n1 1000000000 1\n1 1000000000 1\n1 1000000000 1\n1 1000000000 1\n1 1000000000 1\n1 1000000000 1\n1 1000000000 1\n1 1000000000 1\n1 1000000000 1\n1 1000000000 1\n1 100000...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nHAI\n\nI HAS A TUX\n\nGIMMEH TUX...
[{"type": "stdin_stdout", "input": "9\n0\n0\n0\n0\n0\n0\n0\n0\n1\n", "output": "0.111111\n"}, {"type": "stdin_stdout", "input": "9\n0\n0\n1\n0\n0\n0\n0\n0\n1\n", "output": "0.333333\n"}, {"type": "stdin_stdout", "input": "8\n0\n1\n1\n1\n1\n1\n0\n0\n", "output": "0.833333\n"}, {"type": "stdin_stdout", "input": "9\n0\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\nWhen the curtains are opened, a ...
[{"type": "stdin_stdout", "input": ".CAACCBBA.CBB.AC..BABCCBCCB..B.BC..CBC.CA.CC.C.CC.B.A.CC.BBCCBB..ACAACAC.CBCCB.AABAAC.CBCC.BA..CCBC.\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "CC.AAAC.BA.BBB.AABABBCCAA.A.CBCCB.B.BC.ABCBCBBAA.CACA.CCCA.CB.CCB.A.BCCCB...C.A.BCCBC..B.ABABB.C.BCB\n", "output": "Yes\n"},...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe Squareland national forest i...
[{"type": "stdin_stdout", "input": "1 0\n0 1\n10 10\n", "output": "21\n0 1\n1 0\n1 1\n1 2\n1 3\n1 4\n1 5\n1 6\n1 7\n1 8\n1 9\n1 10\n2 10\n3 10\n4 10\n5 10\n6 10\n7 10\n8 10\n9 10\n10 10\n"}, {"type": "stdin_stdout", "input": "0 0\n5 0\n0 6\n", "output": "12\n0 0\n0 1\n0 2\n0 3\n0 4\n0 5\n0 6\n1 0\n2 0\n3 0\n4 0\n5 0\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 Petya is learning to play...
[{"type": "stdin_stdout", "input": "4 3 1 6\n", "output": "2 1 3\n"}, {"type": "stdin_stdout", "input": "5 5 5 6\n", "output": "1 0 1\n"}, {"type": "stdin_stdout", "input": "1 1 8 8\n", "output": "2 1 7\n"}, {"type": "stdin_stdout", "input": "1 1 8 1\n", "output": "1 0 7\n"}, {"type": "stdin_stdout", "input": "1 1 1 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\n-----Input-----\n\nThe input con...
[{"type": "stdin_stdout", "input": "35\n", "output": "33940307968\n"}, {"type": "stdin_stdout", "input": "34\n", "output": "16970153984\n"}, {"type": "stdin_stdout", "input": "30\n", "output": "1060634624\n"}, {"type": "stdin_stdout", "input": "31\n", "output": "2121269248\n"}, {"type": "stdin_stdout", "input": "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\nIchihime is the current priestes...
[{"type": "stdin_stdout", "input": "14\n2374453 2374454 8591131 23094546\n5813291 5813292 9709163 35032815\n4280399 23049698 23049701 34728360\n15184184 18688462 22400847 22400849\n24397371 31462070 33936330 33936331\n21376685 28241116 38909200 38909202\n29491847 31628480 31628482 45225214\n15144763 15414479 36902879 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\nA plane is flying at a constant ...
[{"type": "stdin_stdout", "input": "2 1000000000\n226784468 315989706\n496707105 621587047\n", "output": "1214085180\n"}, {"type": "stdin_stdout", "input": "2 1000000000\n227369287 404867892\n744314358 920400305\n", "output": "1353584552\n"}, {"type": "stdin_stdout", "input": "2 1000000000\n317863203 547966061\n5829513...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 $x$ a...
[{"type": "stdin_stdout", "input": "69\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 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\nKolya is very absent-minded. Tod...
[{"type": "stdin_stdout", "input": "4 4\n", "output": "40 41\n"}, {"type": "stdin_stdout", "input": "1 1\n", "output": "10 11\n"}, {"type": "stdin_stdout", "input": "9 9\n", "output": "90 91\n"}, {"type": "stdin_stdout", "input": "3 3\n", "output": "30 31\n"}, {"type": "stdin_stdout", "input": "8 8\n", "output": "80 81...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 remember how Kai construc...
[{"type": "stdin_stdout", "input": "2569\n09629965966225566262579565696595696954525955599926383255926955906666526913925296256629966292216925259225261263256229509529259756291959568892569599592218262625256926619266669279659295979299556965525222\n", "output": "44\n"}, {"type": "stdin_stdout", "input": "2559\n5255599526926...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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$ strings $s_1, ...
[{"type": "stdin_stdout", "input": "4\n2\ncaa\ncbb\n3\ncba\ncba\ncbb\n4\nccab\ncbac\nbca\nacbcc\n4\nacb\ncaf\nc\ncbafc\n", "output": "YES\nNO\nYES\nNO\n"}, {"type": "stdin_stdout", "input": "1\n3\nabc\nabc\nabcdddd\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "1\n3\ncaac\ncbbb\naaac\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\nYou know that Japan is the count...
[{"type": "stdin_stdout", "input": "123456789\n", "output": "-O|OOOO-\n-O|OOO-O\n-O|OO-OO\n-O|O-OOO\n-O|-OOOO\nO-|OOOO-\nO-|OOO-O\nO-|OO-OO\nO-|O-OOO\n"}, {"type": "stdin_stdout", "input": "234567890\n", "output": "O-|-OOOO\n-O|OOOO-\n-O|OOO-O\n-O|OO-OO\n-O|O-OOO\n-O|-OOOO\nO-|OOOO-\nO-|OOO-O\nO-|OO-OO\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\nMahmoud and Ehab are on the thir...
[{"type": "stdin_stdout", "input": "32 32\n", "output": "YES\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 131072 131105 0 \n"}, {"type": "stdin_stdout", "input": "32 31\n", "output": "YES\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 131072 131102 0 \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\nBtoh yuo adn yuor roomatme lhoat...
[{"type": "stdin_stdout", "input": "16\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16\n0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15\n", "output": "1.000000\n"}, {"type": "stdin_stdout", "input": "16\n5 6 9 13 13 15 9 10 2 6 10 11 12 7 4 8\n4 3 3 5 8 3 6 5 1 4 2 6 7 4 0 1\n", "output": "0.959707\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\nThere is unrest in the Galactic ...
[{"type": "stdin_stdout", "input": "6 6\n4 3 5 4 5 2\n0 1 0 1 2 0\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "6 6\n1 1 3 2 2 2\n1 0 0 0 0 0\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "6 6\n4 3 5 6 5 5\n0 0 1 1 0 0\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "6 6\n6 2 6 2 5 4\n0 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\nPolycarpus participates in a com...
[{"type": "stdin_stdout", "input": "284254589153928171911281811000\n1009 1000\n", "output": "YES\n2842545891539\n28171911281811000\n"}, {"type": "stdin_stdout", "input": "4802711808015050898224\n8381696 51544172\n", "output": "YES\n48027118080\n15050898224\n"}, {"type": "stdin_stdout", "input": "6450225349035040017740\...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\n[Image] \n\n\n-----Input-----\n\...
[{"type": "stdin_stdout", "input": "13 10\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "14 14\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "19 14\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "21 18\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "29 18\n", "output": "0\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\nThe cows have just learned what ...
[{"type": "stdin_stdout", "input": "1583\n", "output": "672\n"}, {"type": "stdin_stdout", "input": "1987\n", "output": "660\n"}, {"type": "stdin_stdout", "input": "1993\n", "output": "656\n"}, {"type": "stdin_stdout", "input": "1997\n", "output": "996\n"}, {"type": "stdin_stdout", "input": "1999\n", "output": "648\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\nNatasha's favourite numbers are ...
[{"type": "stdin_stdout", "input": "2000 2000\n", "output": "674532367\n"}, {"type": "stdin_stdout", "input": "1134 1092\n", "output": "134680101\n"}, {"type": "stdin_stdout", "input": "1087 1050\n", "output": "973930225\n"}, {"type": "stdin_stdout", "input": "1994 1981\n", "output": "596939902\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\nSereja is a coder and he likes t...
[{"type": "stdin_stdout", "input": "1122 54\n2 1031\n1 363 364\n1 14 15\n1 902 903\n1 1052 1053\n2 170\n2 36\n2 194\n1 340 341\n1 1018 1019\n1 670 671\n1 558 559\n2 431\n2 351\n2 201\n1 1104 1105\n2 1056\n2 823\n1 274 275\n2 980\n1 542 543\n1 807 808\n2 157\n2 895\n1 505 506\n2 658\n1 484 485\n1 533 534\n1 384 385\n2 7...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe stardate is 1977 and the sci...
[{"type": "stdin_stdout", "input": "10\nXXXOOOOXOX\nOOOXXXOXXO\nXOXXXXOOXX\nXOOOXXOXOO\nOOXOOOOOOX\nXXXXOXOOOO\nXXXOOXOXOX\nOOOOXOXOXX\nXOXXOXOOXO\nOOOOOXOOOO\nXXXOOOOXOX\nOOOXXXOXXO\nXOXXXXOOXX\nXOOOXXOXOO\nOOXOOOOOOX\nXXXXOXOOOO\nXXXOOXOXOX\nOOOOXOXOXX\nXOXXOXOOXO\nOOOOOXOOOO\n", "output": "Yes\n"}, {"type": "stdin_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\nBizon the Champion isn't just a ...
[{"type": "stdin_stdout", "input": "itwtyhhsdjjffmmoqkkhxjouypznewstyorotxhozlytndehmaxogrohccnqcgkrjrdmnuaogiwmnmsbdaizqkxnkqxxiihbwepc\nsnixfywvcntitcefsgqxjcodwtumurcglfmnamnowzbjzmfzspbfuldraiepeeiyasmrsneekydsbvazoqszyjxkjiotushsddet\n", "output": "need tree\n"}, {"type": "stdin_stdout", "input": "yyyyxxxxyxyyxxxy...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 Alice was cleaning up he...
[{"type": "stdin_stdout", "input": "21\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\nVasya is pressing the keys on th...
[{"type": "stdin_stdout", "input": "100\n1622 320 1261 282 1604 57 1427 1382 904 911 1719 1682 984 1727 1301 1799 1110 1057 248 764 1642 1325 1172 1677 182 32 665 397 1146 73 412 554 973 874 774 1948 1676 1959 518 280 1467 568 613 760 594 252 224 1359 876 253 760 1566 929 1614 940 1079 288 245 1432 1647 1534 1768 1947 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nRock... Paper!\n\nAfter Karen ha...
[{"type": "stdin_stdout", "input": "30\n1143673 436496 1214486 1315862 148404 724601 1430740 1433008 1654610 1635673 614673 1713408 1270999 1697 1463796 50027 525482 1659078 688200 842647 518551 877506 1017082 1807856 3280 759698 1208220 470180 829800 1960886\n1312613 1965095 967255 1289012 1950383 582960 856825 49684 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 linear function f(x) ...
[{"type": "stdin_stdout", "input": "978837295 606974665 846646545585165081 745145208\n", "output": "154788991\n"}, {"type": "stdin_stdout", "input": "1 1000000000 1000000000000000000 1000000000\n", "output": "999999657\n"}, {"type": "stdin_stdout", "input": "1 1000000000 100000000000000000 1000000000\n", "output": "899...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 is going to sleep now and w...
[{"type": "stdin_stdout", "input": "2 2\n1 1000000000000000000\n1000000000000000000 1000000000000000000\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "2 1\n10000000000 20000000000\n10000000000\n", "output": "YES\n10000000000 1\n"}, {"type": "stdin_stdout", "input": "2 1\n500000000000000000 100000000000000000...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nBearland has n cities, numbered ...
[{"type": "stdin_stdout", "input": "57 88\n54 30 5 43\n", "output": "54 5 1 2 3 4 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 31 32 33 34 35 36 37 38 39 40 41 42 44 45 46 47 48 49 50 51 52 53 55 56 57 43 30\n5 54 1 2 3 4 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 31 32 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\nToday in the scientific lyceum o...
[{"type": "stdin_stdout", "input": "50\nALWLSFLXYPQYMIWXMYMXFYMIVFYJDTJAIGVOAUDAIIAHKNNVTX\n", "output": "13"}, {"type": "stdin_stdout", "input": "50\nVKRGXLUWYURTRNGAODFLYCKAPHGPHGDLWIGXEYVOAVYYXVDRAB\n", "output": "12"}, {"type": "stdin_stdout", "input": "50\nROWGGKNUITVHOBMKZXOZNBZMQGSFERNCZDFKLRBCFVVDXJEFLP\n", "ou...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIlya got tired of sports program...
[{"type": "stdin_stdout", "input": "2000 0.61 2000\n", "output": "1219.999999999999545\n"}, {"type": "stdin_stdout", "input": "2000 1.00 2000\n", "output": "2000.000000000000000\n"}, {"type": "stdin_stdout", "input": "2000 0.99 2000\n", "output": "1980.000000000000000\n"}, {"type": "stdin_stdout", "input": "1000 0.90 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 cards (n is even) in...
[{"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\nOnce upon a time a child got a t...
[{"type": "stdin_stdout", "input": "A.He_nan_de_yang_guang_zhao_yao_zhe_wo_men_mei_guo_ren_lian_shang_dou_xiao_kai_yan_wahaaaaaaaaaaaaaaaa\nB.Li_bai_li_bai_fei_liu_zhi_xia_san_qian_chi_yi_si_yin_he_luo_jiu_tian_li_bai_li_bai_li_bai_li_bai_shi\nC.Peng_yu_xiang_shi_zai_tai_shen_le_jian_zhi_jiu_shi_ye_jie_du_liu_a_si_mi_d...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nVladik is a competitive programm...
[{"type": "stdin_stdout", "input": "16 4 12\n0000000011111111\n", "output": "1"}, {"type": "stdin_stdout", "input": "10 1 10\n0000011111\n", "output": "1"}, {"type": "stdin_stdout", "input": "10 10 1\n0000011111\n", "output": "1"}, {"type": "stdin_stdout", "input": "10 2 10\n0000011111\n", "output": "1"}, {"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\nIt seems that Borya is seriously...
[{"type": "stdin_stdout", "input": "42\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n", "output": "83\n"}, {"type": "stdin_stdout", "input": "15\n1000 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\nGiga Tower is the tallest and de...
[{"type": "stdin_stdout", "input": "-1000000000\n", "output": "2\n"}, {"type": "stdin_stdout", "input": "-410058385\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "-586825624\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "-408490162\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "1000000000\...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWe consider a positive integer p...
[{"type": "stdin_stdout", "input": "10000\n", "output": "10800100\n"}, {"type": "stdin_stdout", "input": "9999\n", "output": "10800010\n"}, {"type": "stdin_stdout", "input": "9139\n", "output": "10134010\n"}, {"type": "stdin_stdout", "input": "9859\n", "output": "10422001\n"}, {"type": "stdin_stdout", "input": "8888\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 still have partial informati...
[{"type": "stdin_stdout", "input": "11\n0 100000000\n200000000 100000000\n200000000 300000000\n400000000 300000000\n400000000 500000000\n600000000 500000000\n600000000 700000000\n800000000 700000000\n800000000 900000000\n1000000000 900000000\n1000000000 1000000000\n", "output": "11\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\nInternational Abbreviation Olymp...
[{"type": "stdin_stdout", "input": "9\nIAO'0\nIAO'00\nIAO'000\nIAO'0000\nIAO'00000\nIAO'000000\nIAO'0000000\nIAO'00000000\nIAO'000000000\n", "output": "1990\n2000\n3000\n10000\n100000\n1000000\n10000000\n100000000\n1000000000\n"}, {"type": "stdin_stdout", "input": "5\nIAO'15\nIAO'2015\nIAO'1\nIAO'9\nIAO'0\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\nПрошло много лет, и на вечеринке...
[{"type": "stdin_stdout", "input": "42\n13 62\n114 242\n265 839\n756 349\n298 476\n533 704\n348 277\n554 573\n654 112\n429 836\n574 766\n909 415\n163 891\n532 983\n873 457\n719 117\n1 302\n170 634\n166 585\n721 231\n208 609\n128 246\n845 726\n604 119\n859 110\n568 515\n656 913\n113 166\n794 566\n834 860\n983 596\n545 8...
code_stdio