messages listlengths 1 1 | ground_truth stringlengths 156 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\n# Task\nJohn was in math class and got bored, so he decided to fold some origami from a rectangular `a × b` s... | [{"input": "1000\n999", "output": "[1000]", "fn_name": "folding"}, {"input": "1000\n700", "output": "[6]", "fn_name": "folding"}, {"input": "10\n7", "output": "[6]", "fn_name": "folding"}, {"input": "2\n1", "output": "[2]", "fn_name": "folding"}, {"input": "3\n1", "output": "[3]", "fn_name": "folding"}, {"input": "4\n1... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nYou are given a string S consisting of a,b and c. Find the number of strings that can be possibly obtained by... | [{"input": "ababacbcacbacacbcbbcbbacbaccacbacbacba\n", "output": "148010497\n"}, {"input": "ababacbcacbacacbcbbcbbbcbaccacbacbacba", "output": "148010497\n"}, {"input": "abcabcabcaccabcbbbcbbcbcacabcacbcababa", "output": "148010497\n"}, {"input": "abcabcabcaccabcbbacbbcbcacabcacbcababa", "output": "148010497\n"}, {"inp... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nproblem\n\nGiven the sequence $ A $ of length $ N $. The $ i $ item in $ A $ is $ A_i $. You can do the follo... | [{"input": "5\n2 10 5 22 4", "output": "0\n"}, {"input": "5\n1 6 7 31 10", "output": "1\n"}, {"input": "5\n1 8 7 31 12", "output": "0\n"}, {"input": "5\n2 10 5 22 8", "output": "0\n"}, {"input": "5\n2 6 12 86 3", "output": "1\n"}, {"input": "5\n2 3 7 105 7", "output": "1\n"}, {"input": "5\n0 4 3 13 4", "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\nGiven a string of integers, return the number of odd-numbered substrings that can be formed. \n\nFor example,... | [{"input": "\"13472315\"", "output": "[28]", "fn_name": "solve"}, {"input": "\"1347231\"", "output": "[20]", "fn_name": "solve"}, {"input": "\"134721\"", "output": "[13]", "fn_name": "solve"}, {"input": "\"13471\"", "output": "[12]", "fn_name": "solve"}, {"input": "\"1357\"", "output": "[10]", "fn_name": "solve"}, {"in... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nAmr doesn't like Maths as he finds it really boring, so he usually sleeps in Maths lectures. But one day the ... | [{"input": "1000 100 777767777\n", "output": "577920877\n"}, {"input": "1000 100 777767777\n", "output": "577920877"}, {"input": "886 10 902171654\n", "output": "134375492\n"}, {"input": "712 53 592302770\n", "output": "147693148\n"}, {"input": "393 71 933802677\n", "output": "366541352\n"}, {"input": "312 41 915197716... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nThere is a circle with a circumference of L. Each point on the circumference has a coordinate value, which re... | [{"input": "4 20 18\n7 2\n9 1\n12 1\n18 1", "output": "10\n16\n7\n9\n"}, {"input": "4 20 18\n3 2\n9 1\n12 1\n18 1", "output": "10\n16\n5\n7\n"}, {"input": "4 20 18\n3 2\n9 1\n12 1\n18 2", "output": "5\n7\n10\n0\n"}, {"input": "4 20 0\n3 2\n9 1\n12 1\n18 2", "output": "3\n9\n12\n18\n"}, {"input": "4 20 9\n7 2\n9 1\n12 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\nThere are n people taking dancing lessons. Every person is characterized by his/her dancing skill ai. At the ... | [{"input": "10\nBGGBBGBGBG\n5445902 3514007 10377301 5241945 14514470 2911201 2983644 2891569 1596021 8471969\n", "output": "5\n6 7\n8 9\n1 2\n3 4\n5 10\n"}, {"input": "10\nBGGBBGBGBG\n5445902 3514007 10377301 5241945 14514470 1220159 2983644 2891569 1596021 8471969\n", "output": "5\n7 8\n6 9\n1 2\n3 4\n5 10\n"}, {"inp... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nYou are given an undirected graph consisting of $n$ vertices. A number is written on each vertex; the number ... | [{"input": "10 10\n3 4 5 10 10 9 5 4 7 8\n1 5 5\n10 3 18\n1 7 20\n7 8 20\n10 4 8\n10 2 17\n9 4 2\n7 5 16\n1 8 17\n7 10 18\n", "output": "67\n"}, {"input": "10 10\n3 4 5 10 10 9 5 4 7 8\n1 5 5\n10 3 18\n1 7 20\n7 8 20\n10 4 8\n10 2 17\n9 4 2\n7 5 16\n1 8 17\n7 10 18\n", "output": "67\n"}, {"input": "2 1\n100000000000 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\nNathan O. Davis has been running an electronic bulletin board system named JAG-channel. He is now having hard... | [{"input": "1\n0\nccpi", "output": "ccpi\n"}, {"input": "1\n0\nipcc", "output": "ipcc\n"}, {"input": "1\n0\njpcc", "output": "jpcc\n"}, {"input": "1\n0\ncbpi", "output": "cbpi\n"}, {"input": "1\n0\niocc", "output": "iocc\n"}, {"input": "1\n0\ncboi", "output": "cboi\n"}, {"input": "1\n0\ncdpi", "output": "cdpi\n"}, {"in... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n# Task\n A ciphertext alphabet is obtained from the plaintext alphabet by means of rearranging some character... | [{"input": "\"jpeuizmi\"\n\"mxxcwriq\"", "output": "[false]", "fn_name": "is_substitution_cipher"}, {"input": "\"aaxxaaz\"\n\"aazzaay\"", "output": "[true]", "fn_name": "is_substitution_cipher"}, {"input": "\"aaxyaa\"\n\"aazzaa\"", "output": "[false]", "fn_name": "is_substitution_cipher"}, {"input": "\"aazzaa\"\n\"aaxy... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nLet's call a sequence of integers $x_1, x_2, \\dots, x_k$ MEX-correct if for all $i$ ($1 \\le i \\le k$) $|x_... | [{"input": "1\n30\n0 0 0 2 0 0 0 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2\n", "output": "998244352\n"}, {"input": "1\n30\n0 0 0 2 0 0 0 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2\n", "output": "998244352\n"}, {"input": "1\n30\n0 0 0 1 0 0 0 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2\n", "output": "587202561\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nGiven the string S and m queries. The i-th query is given by the two strings xi and yi.\n\nFor each query, an... | [{"input": "icpcsummertraining\n9\nmm n\nicpc summer\ntrain ing\nsummer mm\ni c\ni i\nh f\ntrain i\nsummer er", "output": "11\n10\n8\n0\n4\n16\n0\n6\n6\n"}, {"input": "icpcsummertraining\n9\nmm n\nicpc summer\nniart ing\nsummer mm\ni c\ni i\nh f\ntrain i\nsummer er", "output": "11\n10\n0\n0\n4\n16\n0\n6\n6\n"}, {"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\nYou are given a chess board with $n$ rows and $n$ columns. Initially all cells of the board are empty, and yo... | [{"input": "104\n", "output": "WBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWB\nBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBW\nWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBW... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nProblem\n\nThere are N villages. Each village is numbered from 1 to N. Due to the recent merger boom, several... | [{"input": "20 5\n3 4\n1 2\n9 6\n2 6\n2 9", "output": "12\n"}, {"input": "27 5\n3 4\n1 2\n9 6\n2 6\n2 9", "output": "19\n"}, {"input": "10 5\n3 4\n1 2\n9 6\n3 6\n2 9", "output": "3\n"}, {"input": "10 5\n3 5\n1 2\n9 6\n2 6\n2 9", "output": "2\n"}, {"input": "10 5\n3 4\n1 4\n9 6\n3 6\n2 9", "output": "3\n"}, {"input": "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\nRound any given number to the closest 0.5 step\n\nI.E.\n```\nsolution(4.2) = 4\nsolution(4.3) = 4.5\nsolution... | [{"input": "4.74999999999", "output": "[4.5]", "fn_name": "solution"}, {"input": "4.74999999991", "output": "[4.5]", "fn_name": "solution"}, {"input": "4.25", "output": "[4.5]", "fn_name": "solution"}, {"input": "4.55", "output": "[4.5]", "fn_name": "solution"}, {"input": "4.74", "output": "[4.5]", "fn_name": "solution... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nYou are given an integer m.\n\nLet M = 2^{m} - 1.\n\nYou are also given a set of n integers denoted as the se... | [{"input": "30 10\n001000000011000111000010010000\n000001100001010000000000000100\n000110100010100000000000101000\n110000010000000001000000000000\n100001000000000010010101000101\n001001000000000100000000110000\n000000010000100000001000000000\n001000010001000000001000000010\n000000110000000001001010000000\n0000110010000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nThis is a simplified version of the problem B2. Perhaps you should read the problem B2 before you start solvi... | [{"input": "61\nkzaaa\ncodeforces\narchive\ny\nxxxxxx\nkzaaa\ncodeforces\narchive\ny\nxxxxxx\nkzaaa\ncodeforces\narchive\ny\nxxxxxx\nkzaaa\ncodeforces\narchive\ny\nxxxxxx\nkzaaa\ncodeforces\narchive\ny\nxxxxxx\nkzaaa\ncodeforces\narchive\ny\nxxxxxx\nkzaaa\ncodeforces\narchive\ny\nxxxxxx\nkzaaa\ncodeforces\narchive\ny\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\nYou are playing the following game with Joisino.\n - Initially, you have a blank sheet of paper.\n - Joisino ... | [{"input": "6\n12\n22\n16\n22\n18\n12\n", "output": "2\n"}, {"input": "6\n12\n22\n18\n22\n18\n12", "output": "0\n"}, {"input": "6\n12\n22\n18\n35\n18\n12", "output": "2\n"}, {"input": "6\n12\n22\n28\n35\n18\n12", "output": "4\n"}, {"input": "6\n12\n35\n28\n35\n18\n12", "output": "2\n"}, {"input": "6\n10\n34\n63\n35\n19... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nYou will be given a string. \n\nYou need to return an array of three strings by gradually pulling apart the s... | [{"input": "\"reusetestcasesbitcointakeovertheworldmaybewhoknowsperhaps\"", "output": "[[\"spahrepswonkohwebyamdlroweht\", \"reusetestcasesbitcointakeove\", \"r\"]]", "fn_name": "pop_shift"}, {"input": "\"turnsoutrandomtestcasesareeasierthanwritingoutbasicones\"", "output": "[[\"senocisabtuognitirwnahtreis\", \"turnsou... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nLet us consider sets of positive integers less than or equal to n. Note that all elements of a set are differ... | [{"input": "9 3 23\n10 3 22\n10 3 28\n16 10 107\n26 8 102\n20 10 105\n24 10 155\n3 4 3\n4 2 11\n0 0 0", "output": "1\n5\n0\n20\n32200\n5448\n10222\n0\n0\n"}, {"input": "9 3 23\n9 3 22\n10 3 28\n16 10 107\n26 8 102\n20 10 105\n24 10 155\n3 4 3\n4 2 11\n0 0 0", "output": "1\n2\n0\n20\n32200\n5448\n10222\n0\n0\n"}, {"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\nVasya will fancy any number as long as it is an integer power of two. Petya, on the other hand, is very conse... | [{"input": "1000000000 -1000\n", "output": "14\n"}, {"input": "1000000000 -1000\n", "output": "14\n"}, {"input": "1000000010 -1000\n", "output": "15\n"}, {"input": "1010000000 -1000\n", "output": "15\n"}, {"input": "1000000000 1000\n", "output": "16\n"}, {"input": "1000000000 1000\n", "output": "16\n"}, {"input": "3326... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nIvan is playing a strange game.\n\nHe has a matrix a with n rows and m columns. Each element of the matrix is... | [{"input": "3 57 3\n1 0 0 1 1 0 1 1 0 0 0 0 1 0 1 0 0 0 0 0 0 1 0 0 0 0 1 0 0 1 1 0 1 1 1 1 0 1 1 1 0 0 0 1 1 0 0 1 0 0 0 1 1 0 0 1 0\n1 1 0 0 0 1 1 1 0 1 1 0 0 0 0 1 1 0 0 1 0 0 1 1 1 0 1 0 0 0 0 1 1 1 0 0 0 1 0 1 0 0 0 1 1 0 0 0 1 1 0 0 1 1 0 0 0\n1 0 1 0 0 1 1 0 1 0 0 0 1 0 1 0 1 0 1 1 1 1 0 1 0 0 0 1 1 1 1 0 1 1 1 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nThere are N towns located in a line, conveniently numbered 1 through N. Takahashi the merchant is going on a ... | [{"input": "10 100\n7 10 4 5 9 3 6 8 2 1\n", "output": "2\n"}, {"input": "10 100\n7 10 4 5 9 3 6 8 1 1", "output": "2\n"}, {"input": "10 100\n7 10 4 5 9 3 6 8 2 1", "output": "2"}, {"input": "5 8\n50 30 40 10 20\n", "output": "2\n"}, {"input": "5 10\n21 30 40 10 20", "output": "1\n"}, {"input": "5 10\n21 30 40 10 31", ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nHaruna is a high school student. She must remember the seating arrangements in her class because she is a cla... | [{"input": "1 2\n11 0\n0 0", "output": "yes\nyes\n"}, {"input": "2 1\n10 0\n0 0", "output": "yes\nyes\n"}, {"input": "1 4\n11 0\n0 0", "output": "yes\nyes\n"}, {"input": "2 -1\n8 0\n0 0", "output": "yes\nyes\n"}, {"input": "3 0\n4 -1\n0 0", "output": "yes\nyes\n"}, {"input": "2 2\n4 -1\n0 0", "output": "yes\nyes\n"}, {... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nNot long ago Billy came across such a problem, where there were given three natural numbers A, B and C from t... | [{"input": "1000000\n", "output": "111111074060178115\n"}, {"input": "987572\n", "output": "107019643962508968\n"}, {"input": "983242\n", "output": "105618162572849728\n"}, {"input": "600000\n", "output": "23999973325791164\n"}, {"input": "783472\n", "output": "53435215015075583\n"}, {"input": "729761\n", "output": "43... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nFox Ciel starts to learn programming. The first task is drawing a fox! However, that turns out to be too hard... | [{"input": "49 50\n", "output": "##################################################\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\nYou can perfectly predict the price of a certain stock for the next N days. You would like to profit on this ... | [{"input": "100\n411 642 560 340 276 440 515 519 182 314 35 227 390 136 97 5 502 584 567 79 543 444 413 463 455 316 545 329 437 443 9 435 291 384 328 501 603 234 285 297 453 587 550 72 130 163 282 298 605 349 270 198 24 179 243 92 115 56 83 26 3 456 622 325 366 360 299 153 140 552 216 117 61 307 278 189 496 562 38 527 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nA monster is attacking the Cyberland!\n\nMaster Yang, a braver, is going to beat the monster. Yang and the mo... | [{"input": "100 100 100\n100 100 100\n100 100 100\n", "output": "100\n"}, {"input": "100 100 100\n100 100 100\n100 100 100\n", "output": "100\n"}, {"input": "50 100 51\n100 100 100\n1 100 100\n", "output": "1384\n"}, {"input": "100 100 1\n100 100 100\n1 100 100\n", "output": "1891\n"}, {"input": "100 100 1\n100 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\nPetya's friends made him a birthday present — a bracket sequence. Petya was quite disappointed with his gift,... | [{"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\nWe will define the median of a sequence b of length M, as follows:\n - Let b' be the sequence obtained by sor... | [{"input": "10\n15 -1 6 0 -1 7 -1 19 1 3", "output": "3\n"}, {"input": "10\n15 -1 6 0 -1 7 -1 11 1 3", "output": "3\n"}, {"input": "10\n15 -1 6 1 -1 7 -1 11 1 3", "output": "3\n"}, {"input": "10\n15 -1 6 2 -1 7 -1 11 1 3", "output": "3\n"}, {"input": "10\n15 -1 6 4 -1 7 -1 11 1 3", "output": "4\n"}, {"input": "10\n15 -... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nDawid has four bags of candies. The $i$-th of them contains $a_i$ candies. Also, Dawid has two friends. He wa... | [{"input": "100 100 100 100\n", "output": "YES\n"}, {"input": "100 100 100 100\n", "output": "YES\n"}, {"input": "100 100 000 100\n", "output": "NO\n"}, {"input": "100 100 99 100\n", "output": "NO\n"}, {"input": "100 100 99 100\n", "output": "NO\n"}, {"input": "100 000 99 100\n", "output": "NO\n"}, {"input": "100 98 99... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nAn array of integers $p_1, p_2, \\dots, p_n$ is called a permutation if it contains each number from $1$ to $... | [{"input": "5\n-1 2 -3 -1\n", "output": "4 3 5 2 1 "}, {"input": "5\n-1 2 -3 -1\n", "output": "4 3 5 2 1 "}, {"input": "5\n3 -2 1 -3\n", "output": "2 5 3 4 1 "}, {"input": "5\n-4 1 2 -1\n", "output": "5 1 2 4 3 "}, {"input": "5\n-4 1 2 -1\n", "output": "5 1 2 4 3 "}, {"input": "5\n3 -2 1 -3\n", "output": "2 5 3 4 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\nYou are playing some computer game. One of its levels puts you in a maze consisting of n lines, each of which... | [{"input": "21 7\n3 6\n5 2\n......*\n.****.*\n.****.*\n....*.*\n**.**.*\n**.**.*\n**.**.*\n**.**.*\n**.**.*\n**.**.*\n**.**.*\n**.**.*\n**.**.*\n**.**.*\n**.**.*\n**.**.*\n**.**.*\n**.**.*\n**....*\n**....*\n*******\n", "output": "51\n"}, {"input": "21 7\n3 6\n5 2\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\nUser ainta has a permutation p_1, p_2, ..., p_{n}. As the New Year is coming, he wants to make his permutatio... | [{"input": "15\n6 1 2 7 9 13 14 8 4 5 3 12 10 15 11\n000100100100100\n000010010010010\n000001001001001\n100000100100100\n010000010010010\n001000001001001\n100100000100100\n010010000010010\n001001000001001\n100100100000100\n010010010000010\n001001001000001\n100100100100000\n010010010010000\n001001001001000\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\nYou are given a string $s$ consisting of $n$ lowercase Latin letters. $n$ is even.\n\nFor each position $i$ (... | [{"input": "50\n6\nbxyxcz\n4\nzzcy\n2\nzb\n2\nyb\n6\nzzbxyx\n4\nbxzb\n4\naaca\n4\nbzyx\n4\nxaac\n2\nbb\n2\nzb\n6\ncabcbb\n6\nyxzbbb\n2\nxz\n2\ncc\n6\nazcaza\n4\nyyaa\n2\nxb\n2\nyb\n6\nzaxxxz\n4\nbyab\n4\naxxz\n2\nay\n2\nyb\n2\ncx\n4\nzyab\n6\nybcyya\n6\nxayzaz\n4\nzacx\n6\nzzyxbz\n2\ncc\n4\nbycx\n2\nza\n4\naaxz\n6\nczy... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nFor the multiset of positive integers s=\\\\{s_1,s_2,...,s_k\\}, define the Greatest Common Divisor (GCD) and... | [{"input": "10\n972 972 324 972 324 648 1944 243 324 474\n", "output": "162\n"}, {"input": "10\n61 1677 535 769 324 1309 1589 243 324 184\n", "output": "1\n"}, {"input": "10\n61 1677 535 769 627 1309 1589 243 324 184\n", "output": "1\n"}, {"input": "10\n54 972 224 392 324 809 1589 243 324 1357\n", "output": "1\n"}, {"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\nNatasha is going to fly to Mars. She needs to build a rocket, which consists of several stages in some order.... | [{"input": "50 13\nqwertyuiopasdfghjklzxcvbnmaaaaaaaaaaaaaaaaaaaaaaaa\n", "output": "169\n"}, {"input": "50 13\nqwertyuiopasdfghjklzxcvbnmaaaaaaaaaaaaaaaaaaaaaaaa\n", "output": "169"}, {"input": "50 31\nahbyyoxltryqdmvenemaqnbakglgqolxnaifnqtoclnnqiabpz\n", "output": "-1\n"}, {"input": "50 14\nqwertyuiopasdfghjklzxcvbn... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nWe have a tree with N vertices and N-1 edges, respectively numbered 1, 2,\\cdots, N and 1, 2, \\cdots, N-1. E... | [{"input": "10\n5 4\n5 7\n-1 13\n0 9\n12 10\n4 11\n7 4\n11 10\n7 4", "output": "152\n"}, {"input": "10\n5 16\n5 6\n-1 24\n1 10\n13 10\n4 6\n13 4\n6 3\n7 3", "output": "187\n"}, {"input": "10\n5 16\n5 6\n-1 24\n1 10\n13 10\n4 6\n13 4\n6 5\n7 3", "output": "177\n"}, {"input": "10\n1 16\n5 6\n-1 24\n1 10\n13 10\n4 6\n13 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\nYou've probably heard about the twelve labors of Heracles, but do you have any idea about the thirteenth? It ... | [{"input": "4\n4\n3 5 4 5\n2 1\n3 1\n4 3\n2\n21 32\n2 1\n6\n13 13 17 13 13 22\n2 1\n3 1\n4 2\n5 1\n6 1\n4\n10 11 3 11\n1 2\n2 3\n4 1\n", "output": "17 21 24\n53\n91 104 117 130 143\n35 46 56\n"}, {"input": "4\n4\n3 5 4 12\n2 1\n3 1\n4 3\n2\n21 32\n2 1\n6\n13 13 17 13 13 22\n2 1\n3 1\n4 1\n5 1\n6 1\n4\n10 6 3 11\n1 2\n2... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nTakahashi has N sticks that are distinguishable from each other. The length of the i-th stick is L_i.\nHe is ... | [{"input": "2000\n1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 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\nA country decides to build a palace.\nIn this country, the average temperature of a point at an elevation of ... | [{"input": "1000\n20 -20\n51765 34765 54644 24887 70030 45034 46376 88410 33772 52941 79750 44783 70874 36236 36651 16147 23251 11281 36605 69084 74679 18310 88655 92253 0 76064 82769 20419 60361 61197 51619 35110 6063 82815 99426 22379 61759 34008 31814 22642 80907 10203 11864 18291 34343 35250 99120 14402 54252 92425... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nOne day n friends met at a party, they hadn't seen each other for a long time and so they decided to make a g... | [{"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 "}, {"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... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nKattapa, as you all know was one of the greatest warriors of his time. The kingdom of Maahishmati had never l... | [{"input": "5\n12 -1 -2 -2 -2", "output": "READY FOR BATTLE\n"}, {"input": "5\n2 -1 -2 -2 -2", "output": "READY FOR BATTLE\n"}, {"input": "5\n2 -1 -1 -2 -2", "output": "READY FOR BATTLE\n"}, {"input": "5\n4 -1 -1 -2 -2", "output": "READY FOR BATTLE\n"}, {"input": "5\n4 -1 -2 -2 -2", "output": "READY FOR BATTLE\n"}, {"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\nYou have r red, g green and b blue balloons. To decorate a single table for the banquet you need exactly thre... | [{"input": "1000000000 1000000000 1000000000\n", "output": "1000000000\n"}, {"input": "1000000000 2000000000 1000000000\n", "output": "1333333333\n"}, {"input": "2000000000 2000000000 2000000000\n", "output": "2000000000\n"}, {"input": "1585222789 1889821127 2000000000\n", "output": "1825014638\n"}, {"input": "20000000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nThere is a board with a grid consisting of n rows and m columns, the rows are numbered from 1 from top to bot... | [{"input": "500 500 249995\n", "output": " 0\n"}, {"input": "500 500 249999\n", "output": " 0\n"}, {"input": "500 500 249993\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\nYou are given two strings A and B representing essays of two students who are suspected cheaters. For any two... | [{"input": "175 190\nqnnnnnnnnnnrnnnnrnrnnnnnrnnnnrqnnnnnnannnnnnnrnrrnrnnnnnrnnrnnnnnnrnrnnnnnrnnnannnrrnnnnrnnnnnnnnnnnrnannnnnrnnnnrnnnnrnnnnnnrnarnnnnnnnnanrnnnnnnnrnnrrnrnrrnnnnnrnnnnnrnnnnnn\nnnnnnrnnnnrnnnnnrnnnnnnrnnqnnnnnnrnnnnnnnrnnrnnnnrnqnannnnnnnannnnnnnrnrnnnrnnnnrnnnnnnnrrnqnnnnnnnnnnnrnrnnrannnnrnnnnrnr... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nIn a long narrow forest stretching east-west, there are N beasts. Below, we will call the point that is p met... | [{"input": "4\n1 101\n10 152\n812494145527274 53\n1000000000110000 151", "output": "244\n"}, {"input": "4\n2 101\n10 152\n812494145527274 53\n1000000010110000 151", "output": "245\n"}, {"input": "4\n0 101\n10 152\n812494145527274 53\n1000000010110000 151", "output": "243\n"}, {"input": "4\n0 101\n10 242\n48251700863794... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nNeko is playing with his toys on the backyard of Aki's house. Aki decided to play a prank on him, by secretly... | [{"input": "1000\n", "output": "143886430\n"}, {"input": "450\n", "output": "690479399\n"}, {"input": "999\n", "output": "742390865\n"}, {"input": "900\n", "output": "454329300\n"}, {"input": "500\n", "output": "660474384\n"}, {"input": "996\n", "output": "666557857\n"}, {"input": "998\n", "output": "311781222\n"}, {"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\nYou need count how many valleys you will pass.\n\nStart is always from zero level.\n\nEvery time you go down ... | [{"input": "\"UFFDDFDUDFUFUUFFDDFDUDFUFUUFFDDFDUDFUFUUFFDDFDUDFUFUUFFDDFDUDFUFUUFFDDFDUDFUFU\"", "output": "[6]", "fn_name": "counting_valleys"}, {"input": "\"UFFDDFDUDFUFUUFFDDFDUDFUFUUFFDDFDUDFUFUUFFDDFDUDFUFU\"", "output": "[4]", "fn_name": "counting_valleys"}, {"input": "\"UFFDDFDUDFUFUUFFDDUFFDDUFFDDUDUDUDUDUDUUUU... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nIn this kata, you will be given a string of text and valid parentheses, such as `\"h(el)lo\"`. You must retur... | [{"input": "\"one (ruof ((rht)ee) owt)\"", "output": "[\"one (two ((thr)ee) four)\"]", "fn_name": "reverse_in_parentheses"}, {"input": "\"one (two (three) four)\"", "output": "[\"one (ruof (three) owt)\"]", "fn_name": "reverse_in_parentheses"}, {"input": "\"many (parens) on (top)\"", "output": "[\"many (snerap) on (pot... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSimon has a prime number x and an array of non-negative integers a_1, a_2, ..., a_{n}.\n\nSimon loves fractio... | [{"input": "26 7\n0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 2\n", "output": "49\n"}, {"input": "26 7\n0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 2\n", "output": "49\n"}, {"input": "26 2\n0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 2\n", "output": "8\n"}, {"input": "26 2\n0 0 0 0 0 0 0 0 0 0 0 0 0 0... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nLike any unknown mathematician, Yuri has favourite numbers: $A$, $B$, $C$, and $D$, where $A \\leq B \\leq C ... | [{"input": "86565 229134 356183 486713\n", "output": "1559833368660730\n"}, {"input": "90528 225462 336895 417903\n", "output": "1043176084391535\n"}, {"input": "178561 294901 405737 476436\n", "output": "911664147520700\n"}, {"input": "145490 215252 362118 413147\n", "output": "498858571439550\n"}, {"input": "108250 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\nYou are playing a variation of game 2048. Initially you have a multiset $s$ of $n$ integers. Every integer in... | [{"input": "6\n4\n1024 512 64 512\n1\n2048\n3\n128 512 2\n2\n4096 8\n1\n2048 2 2048 2048 2048 2048 2048\n2\n2048 4898\n", "output": "YES\nYES\nNO\nNO\nYES\nYES\n"}, {"input": "6\n4\n1024 512 64 512\n1\n2048\n3\n64 512 2\n2\n4096 4\n7\n2048 2 2048 2048 2048 2048 2048\n2\n2048 4096\n", "output": "YES\nYES\nNO\nNO\nYES\nY... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nCreate a function that checks if a number `n` is divisible by two numbers `x` **AND** `y`. All inputs are pos... | [{"input": "100\n5\n10", "output": "[true]", "fn_name": "is_divisible"}, {"input": "100\n5\n3", "output": "[false]", "fn_name": "is_divisible"}, {"input": "17\n17\n17", "output": "[true]", "fn_name": "is_divisible"}, {"input": "17\n1\n17", "output": "[true]", "fn_name": "is_divisible"}, {"input": "3\n2\n2", "output": "... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nWrite a program which calculates the area and perimeter of a given rectangle.\n\nConstraints\n\n* 1 ≤ a, b ≤ ... | [{"input": "-10 2", "output": "-20 -16\n"}, {"input": "-16 -2", "output": "32 -36\n"}, {"input": "-16 -1", "output": "16 -34\n"}, {"input": "-16 1", "output": "-16 -30\n"}, {"input": "4 122", "output": "488 252\n"}, {"input": "1 122", "output": "122 246\n"}, {"input": "1 -10", "output": "-10 -18\n"}, {"input": "-8 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\nMy friend John and I are members of the \"Fat to Fit Club (FFC)\". John is worried because\neach month a list... | [{"input": "\"387087 176 351832 100 430372 8 58052 54 175432 120 269974 147 309754 91 404858 67 271476 164 295747 111 40\"", "output": "[\"100 111 120 40 8 54 91 164 147 67 176 430372 58052 175432 351832 271476 309754 404858 387087 295747 269974\"]", "fn_name": "order_weight"}, {"input": "\"71899703 200 6 91 425 4 6740... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nYou are given two positive integers $a$ and $b$.\n\nIn one move, you can change $a$ in the following way:\n\n... | [{"input": "5\n2 3\n10 10\n2 4\n7 4\n9 3\n", "output": "1\n0\n2\n2\n1\n"}, {"input": "5\n2 3\n10 10\n2 4\n4 4\n9 3\n", "output": "1\n0\n2\n0\n1\n"}, {"input": "5\n2 3\n10 10\n2 7\n4 4\n9 3\n", "output": "1\n0\n1\n0\n1\n"}, {"input": "5\n2 3\n10 10\n2 2\n4 4\n9 3\n", "output": "1\n0\n0\n0\n1\n"}, {"input": "5\n2 2\n10 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\nVlad went into his appartment house entrance, now he is on the $1$-th floor. He was going to call the elevato... | [{"input": "69\n1 2 3\n3 1 2\n3 2 1\n1 2 3\n3 1 2\n3 2 1\n1 2 3\n3 1 2\n3 2 1\n1 2 3\n3 1 2\n3 2 1\n1 2 3\n3 1 2\n3 2 1\n1 2 3\n3 1 2\n3 2 1\n1 2 3\n3 1 2\n3 2 1\n1 2 3\n3 1 2\n3 2 1\n1 2 3\n3 1 2\n3 2 1\n1 2 3\n3 1 2\n3 2 1\n1 2 3\n3 1 2\n3 2 1\n1 2 3\n3 1 2\n3 2 1\n1 2 3\n3 1 2\n3 2 1\n1 2 3\n3 1 2\n3 2 1\n1 2 3\n3 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\nWe have a grid with 3 rows and N columns. The cell at the i-th row and j-th column is denoted (i, j). Initial... | [{"input": "7\n21 12 1 16 14 6 10\n20 11 0 27 14 7 8\n19 10 3 18 7 4 12", "output": "No\n"}, {"input": "7\n21 12 1 16 14 6 10\n20 12 0 27 14 7 8\n19 10 3 18 7 4 12", "output": "No\n"}, {"input": "7\n21 12 1 16 12 6 10\n20 12 0 27 14 7 8\n19 10 3 18 7 4 12", "output": "No\n"}, {"input": "7\n21 12 1 16 13 6 7\n20 11 2 20... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nEvery Friday and Saturday night, farmer counts amount of sheep returned back to his farm (sheep returned on F... | [{"input": "[2, 5, 8]\n[11, 23, 3, 4, 15, 112, 12, 4]\n355", "output": "[156]", "fn_name": "lostSheep"}, {"input": "[2, 7, 13, 17]\n[23, 56, 44, 12, 1, 2, 1]\n255", "output": "[77]", "fn_name": "lostSheep"}, {"input": "[11, 23, 3, 4, 15]\n[7, 14, 9, 21, 15]\n300", "output": "[178]", "fn_name": "lostSheep"}, {"input": "... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nThe letters shop showcase is a string s, consisting of n lowercase Latin letters. As the name tells, letters ... | [{"input": "100\nwjtwxtttttxjjwxtjtttwxjwjjwjxtwwxxwwwtwttwxjxxjxwxwjtjjwxxxxwwtwtxjxwtwtjjjxwjxjtwwwwtjtttjjtxtwtxjw\n10\nxwjxjwxtwwj\nwxjxxjxjx\nwtjxxxjxjxtwt\njwwxj\njtwjtxjxttxwtw\nwtwxjjjttjx\nwwwjtxw\ntjxjwtjwtw\ntjwtjjxtxjwt\nwxwtxtjw\n", "output": "21\n29\n29\n12\n15\n17\n21\n14\n17\n14\n"}, {"input": "100\nwjt... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nLet a_1, …, a_n be an array of n positive integers. In one operation, you can choose an index i such that a_i... | [{"input": "30 10\n1 1 3 3 5 2 1 8 2 6 11 5 2 6 12 11 8 5 11 3 14 8 16 13 14 25 16 2 8 17\n6 3\n0 15\n1 0\n9 2\n12 16\n1 0\n17 3\n14 13\n0 22\n3 10\n", "output": "3\n15\n16\n2\n0\n16\n0\n0\n8\n4\n"}, {"input": "30 10\n1 1 3 3 5 2 1 8 2 6 11 5 2 6 12 11 8 5 11 3 14 3 16 13 14 25 16 2 8 17\n6 3\n0 15\n1 0\n9 2\n12 16\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\nIahub and Iahubina went to a picnic in a forest full of trees. Less than 5 minutes passed before Iahub rememb... | [{"input": "24\n1 2 3 4 5 10 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24\n", "output": "NO\n"}, {"input": "24\n5 3 3 4 2 6 7 14 9 10 11 12 13 14 29 16 17 18 19 25 31 22 23 24\n", "output": "NO\n"}, {"input": "24\n5 3 3 4 2 6 7 14 9 10 11 12 13 14 29 16 17 18 19 25 31 22 23 37\n", "output": "NO\n"}, {"input": "24... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n## Grade book\n\nComplete the function so that it finds the mean of the three scores passed to it and returns... | [{"input": "100\n100\n100", "output": "[\"A\"]", "fn_name": "get_grade"}, {"input": "100\n85\n96", "output": "[\"A\"]", "fn_name": "get_grade"}, {"input": "70\n70\n100", "output": "[\"B\"]", "fn_name": "get_grade"}, {"input": "95\n90\n93", "output": "[\"A\"]", "fn_name": "get_grade"}, {"input": "92\n93\n94", "output": ... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nVitya is studying in the third grade. During the last math lesson all the pupils wrote on arithmetic quiz. Vi... | [{"input": "1000000000000000000000001\n", "output": "1000000000000000000000000\n"}, {"input": "2442173122931392213712431\n", "output": "1776586566965695556855660"}, {"input": "9009900990099009900990098\n", "output": "4555455545554454445444544"}, {"input": "1000000177157517600000001\n", "output": "1000000088578758800000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nRead problems statements in Mandarin Chinese, Russian and Vietnamese as well. \n\nChef is playing a game with... | [{"input": "2\n-12\n-6", "output": "Misha\nMisha\n"}, {"input": "2\n-12\n-1", "output": "Misha\nChef\n"}, {"input": "2\n-11\n-6", "output": "Chef\nMisha\n"}, {"input": "2\n-15\n-6", "output": "Chef\nMisha\n"}, {"input": "2\n-6\n-10", "output": "Misha\nChef\n"}, {"input": "2\n-6\n-11", "output": "Misha\nChef\n"}, {"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\nPolycarp is reading a book consisting of $n$ pages numbered from $1$ to $n$. Every time he finishes the page ... | [{"input": "7\n1 1\n10 1\n100 3\n1024 14\n998244353 1337\n123 144\n1234312817382646 13\n", "output": "1\n45\n153\n294\n3359835\n0\n427262129093995\n"}, {"input": "7\n1 1\n10 2\n100 3\n1024 14\n998244353 1337\n123 144\n1234312817382646 13\n", "output": "1\n20\n153\n294\n3359835\n0\n427262129093995\n"}, {"input": "7\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\nTwo semifinals have just been in the running tournament. Each semifinal had n participants. There are n parti... | [{"input": "8\n100 101\n200 201\n300 301\n310 400\n320 500\n330 600\n340 700\n350 800\n", "output": "11111000\n11110000\n"}, {"input": "8\n100 101\n200 201\n300 301\n310 400\n320 500\n330 600\n340 700\n350 800\n", "output": "11111000\n11110000\n"}, {"input": "8\n100 101\n200 201\n300 157\n310 400\n320 500\n330 600\n340... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nBob has a rectangular chocolate bar of the size W × H. He introduced a cartesian coordinate system so that th... | [{"input": "9 8 5\n4 3 4 4\n0 4 9 4\n5 4 5 8\n0 3 9 3\n1 4 1 8\n", "output": "4 4 5 16 16 27 \n"}, {"input": "10 10 4\n9 0 9 10\n4 0 4 10\n1 0 1 10\n1 4 4 4\n", "output": "10 10 12 18 50 \n"}, {"input": "14 10 4\n9 0 9 10\n4 0 4 10\n1 0 1 10\n1 4 4 4\n", "output": "10 12 18 50 50\n"}, {"input": "16 10 4\n9 0 9 10\n4 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\nIf the girl doesn't go to Denis, then Denis will go to the girl. Using this rule, the young man left home, bo... | [{"input": "30 8\n0 1 13 12 23 24 26 30\n40 7\n", "output": "30\n"}, {"input": "30 8\n0 1 9 12 23 24 26 30\n40 7\n", "output": "30\n"}, {"input": "30 8\n0 1 9 12 23 24 26 30\n27 7\n", "output": "41\n"}, {"input": "30 8\n0 1 9 10 23 24 26 30\n71 7\n", "output": "30\n"}, {"input": "30 8\n0 1 9 10 23 24 26 30\n71 2\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\nBob is an active user of the social network Faithbug. On this network, people are able to engage in a mutual ... | [{"input": "35\n21 26 18 7 28 2 16 13 16 25 6 32 11 5 31 17 18 3 24 33 14 27 29 1 20 4 12 9 10 30 34 8 19 23 22\n", "output": "0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 \n"}, {"input": "35\n21 26 18 4 28 3 15 13 16 25 6 25 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": "5 7 9 11 13 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\nYou are given a rectangle grid. That grid's size is n × m. Let's denote the coordinate system on the grid. So... | [{"input": "1000000000 1000000000 286536427 579261823 230782719 575570138\n", "output": "171145067 291476754 401927786 867046892\n"}, {"input": "1000000000 1000000000 623214043 753726318 970868535 929707704\n", "output": "29131465 70292296 1000000000 1000000000\n"}, {"input": "1000000000 1000000000 500000000 500000000 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nWrite a function that checks if all the letters in the second string are present in the first one at least on... | [{"input": "[\"mastering\", \"streaming\"]", "output": "[true]", "fn_name": "letter_check"}, {"input": "[\"THE EYES\", \"they see\"]", "output": "[true]", "fn_name": "letter_check"}, {"input": "[\"drapes\", \"compadres\"]", "output": "[false]", "fn_name": "letter_check"}, {"input": "[\"assert\", \"staring\"]", "output"... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n[THE SxPLAY & KIVΛ - 漂流](https://soundcloud.com/kivawu/hyouryu)\n\n[KIVΛ & Nikki Simmons - Perspectives](http... | [{"input": "10000000000000000 10000000000000000 100 100 10000000000000000 10000000000000000\n10000000000000000 10000000000000000 10000000000000000\n", "output": "1\n"}, {"input": "10000000000000000 10000000000000000 100 100 10000000000000000 10000000000000000\n10000000000000000 10000000000000000 10000000100000000\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\nLa Confiserie d'ABC sells cakes at 4 dollars each and doughnuts at 7 dollars each.\nDetermine if there is a w... | [{"input": "100\n", "output": "Yes\n"}, {"input": "11\n", "output": "Yes\n"}, {"input": "40\n", "output": "Yes\n"}, {"input": "12\n", "output": "Yes\n"}, {"input": "15\n", "output": "Yes\n"}, {"input": "16\n", "output": "Yes\n"}, {"input": "19\n", "output": "Yes\n"}, {"input": "20\n", "output": "Yes\n"}, {"input": "56\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nInnovation technologies are on a victorious march around the planet. They integrate into all spheres of human... | [{"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"}, {"input": "10\n739 307\n523 658\n700 143\n373 577\n120 433\n353 833\n665 516\n988 101\n817 604\n800 551\n10\n431... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nYou are given a tree with $n$ vertices. You are allowed to modify the structure of the tree through the follo... | [{"input": "15\n4 6\n8 4\n12 11\n7 6\n9 8\n5 1\n14 13\n6 13\n1 4\n1 2\n6 11\n10 8\n15 14\n3 1\n", "output": "4\n"}, {"input": "15\n4 6\n8 4\n12 11\n7 6\n9 8\n5 1\n14 13\n6 13\n1 4\n1 2\n6 11\n10 8\n15 14\n3 1\n", "output": "4\n"}, {"input": "15\n9 11\n8 15\n6 5\n12 10\n1 2\n5 11\n10 7\n3 2\n6 7\n4 8\n3 5\n9 13\n13 14\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\nChef is playing a game on a sequence of N positive integers, say A_{1}, A_{2}, ... A_{N}. The game is played ... | [{"input": "3\n2\n10 30\n2\n7 14\n3\n12 10 24", "output": "10\n7\n2\n"}, {"input": "3\n2\n10 21\n2\n20 10\n3\n11 10 9", "output": "1\n10\n1\n"}, {"input": "3\n2\n10 10\n2\n10 14\n3\n8 14 22", "output": "10\n2\n2\n"}, {"input": "3\n2\n19 19\n2\n10 14\n3\n8 10 24", "output": "19\n2\n2\n"}, {"input": "3\n2\n16 19\n2\n10 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\nOne day n friends gathered together to play \"Mafia\". During each round of the game some player must be the ... | [{"input": "100\n1 555 876 444 262 234 231 598 416 261 206 165 181 988 469 123 602 592 533 97 864 716 831 156 962 341 207 377 892 51 866 96 757 317 832 476 549 472 770 1000 887 145 956 515 992 653 972 677 973 527 984 559 280 346 580 30 372 547 209 929 492 520 446 726 47 170 699 560 814 206 688 955 308 287 26 102 77 430... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nRead problems statements in Mandarin Chinese and Russian \n\nChef is going to participate in a new quiz sho... | [{"input": "3\n5\nABCDE\nEBCDA\n1 10 34 18 78 225\n4\nCHEE\nQUIZ\n15 3 3 1 0\n8\nABBABAAB\nABABABAB\n100 100 100 100 001 001 000 000 000", "output": "34\n15\n100\n"}, {"input": "3\n5\nABCDE\nEBCDA\n1 10 34 18 63 225\n4\nCHEE\nQUIZ\n15 3 3 1 0\n8\nABBABAAB\nABABABAB\n100 101 100 100 001 001 000 000 001", "output": "34\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\nUnary is a minimalistic Brainfuck dialect in which programs are written using only one token. \n\nBrainfuck p... | [{"input": ",]+>.],,+->+>-[]][><,-]><]++<.,-[.>.<+.[.<,[-,,[<]+>]->>]>]-+-+<][].,.]+][[<,-.+][+<<-+.],,,<,.]-].-\n", "output": "859903\n"}, {"input": ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n", "output": "208877\n"}, {"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\nZS the Coder and Chris the Baboon has explored Udayland for quite some time. They realize that it consists of... | [{"input": "84\n2 50 67 79 71 45 43 40 57 20 25 8 60 47 52 10 37 23 1 28 22 26 3 42 11 63 61 68 49 32 55 18 5 24 31 70 66 27 38 41 54 12 65 51 15 34 30 35 77 74 21 62 33 16 81 14 19 48 80 73 69 78 39 6 76 46 75 72 84 29 58 59 13 17 82 9 83 4 36 56 53 7 64 44\n", "output": "428380105\n"}, {"input": "84\n2 50 67 79 71 45... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nBizon the Champion isn't just attentive, he also is very hardworking.\n\nBizon the Champion decided to paint ... | [{"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"}, {"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"}, {"input": "30\n1 4 5 3 9 7 8 4 5 1 2 3 4 2 3 4 5 5 6 8 1 2 9 4 3 7 2 6 5 4\n", "output": "25\n"}, {"input": "30\n1 4 5 3 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\nThe Chef likes to stay in touch with his staff. So, the Chef, the head server, and the sous-chef all carry tw... | [{"input": "3\n2\n0 -1\n-1 -1\n1 0\n2\n0 0\n0 -1\n1 -1\n2\n1 0\n1 2\n1 1", "output": "yes\nyes\nyes\n"}, {"input": "3\n2\n0 -1\n-1 -1\n1 0\n2\n1 0\n0 -1\n1 -1\n2\n1 0\n1 2\n1 1", "output": "yes\nyes\nyes\n"}, {"input": "3\n2\n0 -1\n-1 -1\n1 0\n2\n0 1\n0 -1\n1 -1\n2\n1 0\n1 2\n1 1", "output": "yes\nyes\nyes\n"}, {"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\nA [Word Square](https://en.wikipedia.org/wiki/Word_square) is a set of words written out in a square grid, su... | [{"input": "\"DESCENDANTECHENEIDAESHORTCOATSCERBERULUSENTEROMERENECROLATERDIOUMABANAADALETABATNATURENAMETESSERATED\"", "output": "[true]", "fn_name": "word_square"}, {"input": "\"GLASSESRELAPSEIMITATESMEAREDTANNERY\"", "output": "[false]", "fn_name": "word_square"}, {"input": "\"FRACTUREOUTLINEDBLOOMINGSEPTETTE\"", "ou... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nWrite a function that will check whether the permutation of an input string is a palindrome. Bonus points for... | [{"input": "\"abcdefghba\"", "output": "[false]", "fn_name": "permute_a_palindrome"}, {"input": "\"racecars\"", "output": "[false]", "fn_name": "permute_a_palindrome"}, {"input": "\"baabcd\"", "output": "[false]", "fn_name": "permute_a_palindrome"}, {"input": "\"baa\"", "output": "[true]", "fn_name": "permute_a_palindr... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nExample\n\nInput\n\n3\n1 3 3\n2\n1 2\n1 3\n\n\nOutput\n\n5### Format: Read the inputs from stdin solve the pr... | [{"input": "3\n0 2 0\n-1\n1 2\n0 2", "output": "3\n"}, {"input": "3\n0 2 0\n-1\n1 2\n0 1", "output": "3\n"}, {"input": "3\n1 1 0\n0\n1 2\n-1 1", "output": "3\n"}, {"input": "3\n0 1 1\n0\n2 1\n-1 1", "output": "3\n"}, {"input": "3\n0 0 0\n0\n0 1\n-1 1", "output": "3\n"}, {"input": "3\n1 0 0\n0\n1 2\n-1 1", "output": "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\n**Debug** a function called calculate that takes 3 values. The first and third values are numbers. The second... | [{"input": "-2\n\"codewars\"\n-2", "output": "[null]", "fn_name": "calculate"}, {"input": "3.2\n\"+\"\n8", "output": "[11.2]", "fn_name": "calculate"}, {"input": "3.2\n\"-\"\n8", "output": "[-4.8]", "fn_name": "calculate"}, {"input": "3.2\n\"*\"\n8", "output": "[25.6]", "fn_name": "calculate"}, {"input": "6\n\"-\"\n1.5... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nVasilisa the Wise from the Kingdom of Far Far Away got a magic box with a secret as a present from her friend... | [{"input": "16 14\n15 15\n17 13\n", "output": "9 7\n6 8\n"}, {"input": "12 14\n11 15\n9 17\n", "output": "3 9\n8 6\n"}, {"input": "12 12\n14 10\n16 8\n", "output": "9 3\n5 7\n"}, {"input": "11 11\n17 5\n12 10\n", "output": "9 2\n8 3\n"}, {"input": "14 11\n16 9\n13 12\n", "output": "9 5\n7 4\n"}, {"input": "15 11\n16 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\nYou have to organize a wedding party. The program of the party will include a concentration game played by th... | [{"input": "-2 1 -3 1 1 0 0 1\n1 -1 2 1 2 2 -1 3\n8", "output": "145\n0\n"}, {"input": "-2 1 0 1 1 0 1 3\n2 0 2 0 3 2 0 4\n10", "output": "173\n256\n"}, {"input": "-2 1 -2 1 1 0 1 2\n1 0 2 1 2 2 0 3\n5", "output": "145\n29\n"}, {"input": "-2 1 -2 1 1 0 1 3\n1 0 2 1 2 2 0 3\n5", "output": "125\n29\n"}, {"input": "-2 1 -... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nDima's got a staircase that consists of n stairs. The first stair is at height a1, the second one is at a2, t... | [{"input": "5\n1 2 3 6 6\n25\n1 1000000000\n1 1000000000\n1 1000000000\n1 1000000000\n1 1000000000\n1 1000000000\n1 1000000000\n1 1000000000\n1 1000000000\n1 1000000000\n1 1000000000\n1 1000000000\n1 1000000000\n1 1000000000\n1 1000000000\n1 1000000000\n1 1000000000\n1 1000000000\n1 1000000000\n1 1000000000\n1 10000000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nA sequence $a = [a_1, a_2, \\ldots, a_l]$ of length $l$ has an ascent if there exists a pair of indices $(i, ... | [{"input": "10\n3 62 24 39\n1 17\n1 99\n1 60\n1 64\n1 30\n2 79 29\n2 20 73\n2 85 37\n1 100\n", "output": "72\n"}, {"input": "10\n3 62 24 39\n1 17\n1 99\n1 60\n1 64\n1 30\n2 79 29\n2 20 73\n2 85 37\n1 100\n", "output": "72\n"}, {"input": "5\n5 1 2 2 4 5\n4 -1 2 3 6\n3 3 2 1\n2 3 1\n1 0\n", "output": "22\n"}, {"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\nDropCaps means that the first letter of the starting word of the paragraph should be in caps and the remainin... | [{"input": "\"Revelation of the contents outraged American public opinion, and helped generate\"", "output": "[\"Revelation of The Contents Outraged American Public Opinion, And Helped Generate\"]", "fn_name": "drop_cap"}, {"input": "\"more than one space between words\"", "output": "[\"More Than One Space Betw... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nStudent Valera is an undergraduate student at the University. His end of term exams are approaching and he is... | [{"input": "1\n1000000000 999999999\n", "output": "999999999\n"}, {"input": "1\n1000000000 999999999\n", "output": "999999999\n"}, {"input": "1\n1010000000 999999999\n", "output": "999999999\n"}, {"input": "1\n1010000000 498441652\n", "output": "498441652\n"}, {"input": "1\n1000000000 115308630\n", "output": "115308630... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nAlice and Johnny are playing a simple guessing game. Johnny picks an arbitrary positive integer n (1<=n<=109)... | [{"input": "3\n2\n< 100 No\n> 100 No\n3\n< 2 Yes\n> 4 Yes\n= 3 No\n6\n< 2 Yes\n> 1 Yes\n= 1 Yes\n= 1 Yes\n= 1 Yes\n= 1 Yes", "output": "0\n1\n1\n"}, {"input": "3\n2\n< 100 No\n? 100 No\n3\n< 2 Yes\n> 4 Yes\n= 3 No\n6\n< 2 Yes\n> 1 Yes\n= 1 Yes\n= 1 Yes\n> 1 Yes\n= 1 Yes", "output": "0\n1\n2\n"}, {"input": "3\n2\n< 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\nLavrenty, a baker, is going to make several buns with stuffings and sell them.\n\nLavrenty has n grams of dou... | [{"input": "1000 10 100 75\n100 97 100 95\n100 64 100 78\n110 82 100 35\n100 51 100 64\n100 67 100 25\n100 79 100 33\n100 65 100 85\n100 99 100 78\n100 53 100 74\n100 87 100 73\n", "output": "786\n"}, {"input": "1000 10 100 75\n100 97 100 95\n100 64 100 78\n100 82 100 35\n100 51 100 64\n100 67 100 25\n100 79 100 33\n10... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSereja owns a restaurant for n people. The restaurant hall has a coat rack with n hooks. Each restaurant visi... | [{"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 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\nPolycarpus has n friends in Tarasov city. Polycarpus knows phone numbers of all his friends: they are strings... | [{"input": "10\n17254072509168593435\n17254072509168593433\n17254072509168593430\n17254072509168593432\n17254072509168593439\n17254072509168593436\n17254072509168593438\n17254072509168593437\n17254072509168593431\n17254072509168593434\n", "output": "19\n"}, {"input": "10\n17254072509168593435\n17475068102414404607\n172... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nMadeline has an array $a$ of $n$ integers. A pair $(u, v)$ of integers forms an inversion in $a$ if:\n\n $1 ... | [{"input": "100\n32 85 33 27 35 48 64 40 45 120 68 58 108 115 99 71 47 82 42 34 63 49 102 30 88 70 73 52 51 95 104 41 38 59 91 21 43 107 44 113 109 25 55 118 112 90 37 106 103 100 114 78 31 26 92 79 89 105 62 54 72 69 101 36 98 77 93 97 75 96 22 76 86 57 46 110 65 61 23 50 83 87 39 74 111 67 29 84 24 28 56 116 80 117 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\nThere is a frequency operation in the conversion operation of a finite number sequence. The conversion result... | [{"input": "10\n2 5 1 -1 3 4 27 0 -2 6\n0", "output": "2\n10 10 10 10 10 10 10 10 10 10\n"}, {"input": "10\n2 1 0 0 3 5 0 0 0 12\n0", "output": "3\n10 10 10 10 10 10 10 10 10 10\n"}, {"input": "10\n2 5 1 0 3 4 27 0 -2 10\n0", "output": "2\n8 8 8 2 8 8 8 2 8 8\n"}, {"input": "10\n2 5 1 -1 3 4 27 0 -2 5\n0", "output": "2... | code_stdio |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.