messages listlengths 1 1 | ground_truth stringlengths 88 726k | dataset stringclasses 2
values |
|---|---|---|
[
{
"content": "Solve the following coding problem using the programming language python:\n\nAnother programming contest is over. You got hold of the contest's final results table. The table has the following data. For each team we are shown two numbers: the number of problems and the total penalty time. However,... | [{"type": "stdin_stdout", "input": "50 50\n50 50\n50 50\n50 50\n50 50\n50 50\n50 50\n50 50\n50 50\n50 50\n50 50\n50 50\n50 50\n50 50\n50 50\n50 50\n50 50\n50 50\n50 50\n50 50\n50 50\n50 50\n50 50\n50 50\n50 50\n50 50\n50 50\n50 50\n50 50\n50 50\n50 50\n50 50\n50 50\n50 50\n50 50\n50 50\n50 50\n50 50\n50 50\n50 50\n50 5... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nGiven a string consisting of only numbers from 0 to 9, consider the operation of creating a new string from that string according to the following rules. Read the given string one character at a time from the left end. Go... | [{"type": "stdin_stdout", "input": "5\n28\n14\n1\n0", "output": "11131221121113122118\n311311222113111231131112132112311321322112111312211312111322212311322113212221\n"}, {"type": "stdin_stdout", "input": "5\n23\n14\n1\n0", "output": "11131221121113122113\n311311222113111231131112132112311321322112111312211312111322212... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nSuppose you have two points $p = (x_p, y_p)$ and $q = (x_q, y_q)$. Let's denote the Manhattan distance between them as $d(p, q) = |x_p - x_q| + |y_p - y_q|$.\n\nLet's say that three points $p$, $q$, $r$ form a bad triple ... | [{"type": "stdin_stdout", "input": "3\n4\n2 4 1 3\n5\n6 9 1 18 12\n2\n13 37\n", "output": "10\n13\n3\n"}, {"type": "stdin_stdout", "input": "3\n4\n2 4 1 3\n5\n6 9 2 18 12\n2\n13 37\n", "output": "10\n13\n3\n"}, {"type": "stdin_stdout", "input": "3\n4\n2 4 1 3\n5\n0 9 2 18 12\n2\n13 37\n", "output": "10\n13\n3\n"}, {"ty... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nEvery superhero has been given a power value by the Felicity Committee. The avengers crew wants to maximize the average power of the superheroes in their team by performing certain operations.\n\nInitially, there are $n$ ... | [{"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": "Solve the following coding problem using the programming language python:\n\nGag\n\nSegtree has $ N $ of \"gags\", each with a value of $ V_i $.\n\nSegtree decided to publish all the gags in any order.\n\nHere, the \"joy\" you get when you publish the $ i $ th gag to the $ j $ th is expressed as $... | [{"type": "stdin_stdout", "input": "1\n114525", "output": "114524\n"}, {"type": "stdin_stdout", "input": "1\n105905", "output": "105904\n"}, {"type": "stdin_stdout", "input": "1\n196252", "output": "196251\n"}, {"type": "stdin_stdout", "input": "1\n127413", "output": "127412\n"}, {"type": "stdin_stdout", "input": "1\n3... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nYour task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently.\n\n\n\nInput\n\nA sequence of integers ai (1 β€ ai β€ 10... | [{"type": "stdin_stdout", "input": "5\n11\n3\n5\n8\n10\n11\n8\n29\n1\n3\n2", "output": "3\n5\n8\n11\n"}, {"type": "stdin_stdout", "input": "5\n11\n4\n10\n4\n-1\n20\n8\n20\n2\n8\n0", "output": "4\n8\n20\n"}, {"type": "stdin_stdout", "input": "5\n11\n2\n11\n1\n-2\n20\n8\n22\n2\n6\n1", "output": "1\n2\n11\n"}, {"type": "s... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nWrite a function `consonantCount`, `consonant_count` or `ConsonantCount` that takes a string of English-language text and returns the number of consonants in the string.\n\nConsonants are all letters used to write English... | [{"input": "\"h^$&^#$&^elLo world\"", "output": "[7]", "fn_name": "consonant_count"}, {"input": "\"helLo world\"", "output": "[7]", "fn_name": "consonant_count"}, {"input": "\"0123456789\"", "output": "[0]", "fn_name": "consonant_count"}, {"input": "\"012345_Cb\"", "output": "[2]", "fn_name": "consonant_count"}, {"inpu... | code_functional |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nVasya's house is situated in a forest, and there is a mushroom glade near it. The glade consists of two rows, each of which can be divided into n consecutive cells. For each cell Vasya knows how fast the mushrooms grow in... | [{"type": "stdin_stdout", "input": "6\n4 1 11 9 3 11\n12 32 19 12 19 11\n", "output": "1035\n"}, {"type": "stdin_stdout", "input": "6\n4 1 11 6 3 11\n12 32 19 12 19 11\n", "output": "1026\n"}, {"type": "stdin_stdout", "input": "6\n4 1 11 6 3 18\n12 32 19 12 19 11\n", "output": "1061\n"}, {"type": "stdin_stdout", "input... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\n# Task\n An `amazon` (also known as a queen+knight compound) is an imaginary chess piece that can move like a `queen` or a `knight` (or, equivalently, like a `rook`, `bishop`, or `knight`). The diagram below shows all squ... | [{"input": "\"e5\"\n\"f6\"", "output": "[[12, 10, 0, 33]]", "fn_name": "amazon_check_mate"}, {"input": "\"a1\"\n\"g5\"", "output": "[[0, 29, 1, 29]]", "fn_name": "amazon_check_mate"}, {"input": "\"a3\"\n\"e4\"", "output": "[[1, 32, 1, 23]]", "fn_name": "amazon_check_mate"}, {"input": "\"f3\"\n\"f2\"", "output": "[[6, 1... | code_functional |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nPerhaps many have heard that the World Biathlon Championship has finished. Although our hero Valera was not present at this spectacular event himself and only watched it on TV, it excited him so much that he decided to en... | [{"type": "stdin_stdout", "input": "15\n17 5\n-19 5\n-8 3\n27 2\n45 3\n36 2\n-32 2\n49 1\n-3 2\n-41 2\n-35 1\n-46 1\n-29 1\n33 1\n0 1\n50\n24 -4\n41 3\n37 3\n9 2\n38 -4\n-30 2\n-41 -5\n-9 -5\n-33 3\n0 2\n-20 -3\n-49 -4\n34 1\n-38 -2\n17 -1\n-33 3\n-17 4\n16 3\n-49 2\n-3 -4\n-9 2\n35 3\n37 -5\n0 0\n-46 -5\n48 1\n-22 -4\... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nSnuke is going to open a contest named \"AtCoder s Contest\".\nHere, s is a string of length 1 or greater, where the first character is an uppercase English letter, and the second and subsequent characters are lowercase E... | [{"type": "stdin_stdout", "input": "AtCoder Beginner Contest\n", "output": "ABC\n"}, {"type": "stdin_stdout", "input": "AtCoder Befinner Contest", "output": "ABC\n"}, {"type": "stdin_stdout", "input": "AtCoder sennifeB Cpntest", "output": "AsC\n"}, {"type": "stdin_stdout", "input": "AtCoder rennigeB Contest", "output":... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nSimple enough this one - you will be given an array. The values in the array will either be numbers or strings, or a mix of both. You will not get an empty array, nor a sparse one.\n\nYour job is to return a single array ... | [{"input": "[\"Hackathon\", \"Katathon\", \"Code\", \"CodeWars\", \"Laptop\", \"Macbook\", \"JavaScript\", 1, 5, 2]", "output": "[[1, 2, 5, \"Code\", \"CodeWars\", \"Hackathon\", \"JavaScript\", \"Katathon\", \"Laptop\", \"Macbook\"]]", "fn_name": "db_sort"}, {"input": "[82, 18, 72, 1, 11, 12, 12, 12, 12, 115, 667, 12,... | code_functional |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nThe new Β£5 notes have been recently released in the UK and they've certainly became a sensation! Even those of us who haven't been carrying any cash around for a while, having given in to the convenience of cards, suddenl... | [{"input": "5300\n[1190, 1010, 1045, 55, 10, 19, 55]", "output": "[383]", "fn_name": "get_new_notes"}, {"input": "10000\n[1800, 500, 1200, 655, 150]", "output": "[1139]", "fn_name": "get_new_notes"}, {"input": "3600\n[1800, 350, 460, 500, 15]", "output": "[95]", "fn_name": "get_new_notes"}, {"input": "2300\n[590, 1500,... | code_functional |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nPermutation p is an ordered set of integers p1, p2, ..., pn, consisting of n distinct positive integers not larger than n. We'll denote as n the length of permutation p1, p2, ..., pn.\n\nYour task is to find such permutat... | [{"type": "stdin_stdout", "input": "18247 939\n", "output": "1 940 2 939 3 938 4 937 5 936 6 935 7 934 8 933 9 932 10 931 11 930 12 929 13 928 14 927 15 926 16 925 17 924 18 923 19 922 20 921 21 920 22 919 23 918 24 917 25 916 26 915 27 914 28 913 29 912 30 911 31 910 32 909 33 908 34 907 35 906 36 905 37 904 38 903 39... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nThe only difference between easy and hard versions is constraints.\n\nIvan plays a computer game that contains some microtransactions to make characters look cooler. Since Ivan wants his character to be really cool, he wa... | [{"type": "stdin_stdout", "input": "78 36\n0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0\n1 52\n2 6\n9 43\n10 52\n4 63\n9 35\n10 67\n9 17\n3 43\n4 38\n1 27\n9 44\n6 74\n7 3\n8 18\n1 52\n1 68\n5 51\n5 2\n11 50\n... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nGiven a string, you progressively need to concatenate the first letter from the left and the first letter to the right and \"1\", then the second letter from the left and the second letter to the right and \"2\", and so o... | [{"input": "\"CodeWars Rocks\"", "output": "[\"Cs1ok2dc3eo4WR5a 6rs7\"]", "fn_name": "char_concat"}, {"input": "\"$'D8KB)%PO@s\"", "output": "[\"$s1'@2DO38P4K%5B)6\"]", "fn_name": "char_concat"}, {"input": "\"1234567890\"", "output": "[\"101292383474565\"]", "fn_name": "char_concat"}, {"input": "\"CodeWars\"", "output"... | code_functional |
[
{
"content": "Solve the following coding problem using the programming language python:\n\n# Task\n Vanya gets bored one day and decides to enumerate a large pile of rocks. He first counts the rocks and finds out that he has `n` rocks in the pile, then he goes to the store to buy labels for enumeration. \n \n E... | [{"input": "36123011", "output": "[277872985]", "fn_name": "rocks"}, {"input": "100", "output": "[192]", "fn_name": "rocks"}, {"input": "10", "output": "[11]", "fn_name": "rocks"}, {"input": "13", "output": "[17]", "fn_name": "rocks"}, {"input": "1", "output": "[1]", "fn_name": "rocks"}] | code_functional |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nYou are given an expression of the form $a{+}b$, where $a$ and $b$ are integers from $0$ to $9$. You have to evaluate it and print the result.\n\n\n-----Input-----\n\nThe first line contains one integer $t$ ($1 \\le t \\l... | [{"type": "stdin_stdout", "input": "100\n0+0\n0+1\n0+2\n0+3\n0+4\n0+5\n0+6\n0+7\n0+8\n0+9\n1+0\n1+1\n1+2\n1+3\n1+4\n1+5\n1+6\n1+7\n1+8\n1+9\n2+0\n2+1\n2+2\n2+3\n2+4\n2+5\n2+6\n2+7\n2+8\n2+9\n3+0\n3+1\n3+2\n3+3\n3+4\n3+5\n3+6\n3+7\n3+8\n3+9\n4+0\n4+1\n4+2\n4+3\n4+4\n4+5\n4+6\n4+7\n4+8\n4+9\n5+0\n5+1\n5+2\n5+3\n5+4\n5+5\... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nA marine themed rival site to Codewars has started. Codwars is advertising their website all over the internet using subdomains to hide or obfuscate their domain to trick people into clicking on their site.\n\nYour task i... | [{"input": "\"https://this.is.an.unneccesarily.long.subdomain.codewars.com/katas.are.really.fun.codwars.com/\"", "output": "[false]", "fn_name": "find_codwars"}, {"input": "\"https://this.is.an.unneccesarily.long.subdomain.codwars.comp/katas.are.really.fun.codwars.com/\"", "output": "[false]", "fn_name": "find_codwars"... | code_functional |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nAs we all know Barney's job is \"PLEASE\" and he has not much to do at work. That's why he started playing \"cups and key\". In this game there are three identical cups arranged in a line from left to right. Initially key... | [{"type": "stdin_stdout", "input": "12\n254904759290707697 475737283258450340 533306428548398547 442127134828578937 779740159015946254 272877594683860919 93000149670491971 632184275887310175 498293278222136720 551099726729989816 149940343283925029 989425634209891686\n", "output": "461895893/385687671\n"}, {"type": "std... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nNauuo is a girl who loves writing comments.\n\nOne day, she posted a comment on Codeforces, wondering whether she would get upvotes or downvotes.\n\nIt's known that there were $x$ persons who would upvote, $y$ persons who... | [{"type": "stdin_stdout", "input": "000 100 100\n", "output": "?\n"}, {"type": "stdin_stdout", "input": "100 100 100\n", "output": "?"}, {"type": "stdin_stdout", "input": "100 100 100\n", "output": "?"}, {"type": "stdin_stdout", "input": "101 0 100\n", "output": "+\n"}, {"type": "stdin_stdout", "input": "25 24 100\n", ... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nGiven two arrays, the purpose of this Kata is to check if these two arrays are the same. \"The same\" in this Kata means the two arrays contains arrays of 2 numbers which are same and not necessarily sorted the same way. ... | [{"input": "[[2, 5], [3, 5], [6, 2]]\n[[2, 6], [5, 3], [2, 5]]", "output": "[true]", "fn_name": "same"}, {"input": "[[2, 5], [3, 5], [6, 2]]\n[[3, 5], [6, 2], [5, 2]]", "output": "[true]", "fn_name": "same"}, {"input": "[[2, 3], [3, 4]]\n[[4, 3], [2, 4]]", "output": "[false]", "fn_name": "same"}, {"input": "[[2, 5], [3... | code_functional |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nThe construction of subway in Bertown is almost finished! The President of Berland will visit this city soon to look at the new subway himself.\n\nThere are n stations in the subway. It was built according to the Bertown ... | [{"type": "stdin_stdout", "input": "100\n98 52 63 2 18 96 31 58 84 40 41 45 66 100 46 71 26 48 81 20 73 91 68 76 13 93 17 29 64 95 79 21 55 75 19 85 54 51 89 78 15 87 43 59 36 1 90 35 65 56 62 28 86 5 82 49 3 99 33 9 92 32 74 69 27 22 77 16 44 94 34 6 57 70 23 12 61 25 8 11 67 47 83 88 10 14 30 7 97 60 42 37 24 38 53 5... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nYour users passwords were all stole in the Yahoo! hack, and it turns out they have been lax in creating secure passwords. Create a function that checks their new password (passed as a string) to make sure it meets the fo... | [{"input": "\"P1@pP1@pP1@pP1@pP1@pP1@p\"", "output": "[\"not valid\"]", "fn_name": "check_password"}, {"input": "\"password\"", "output": "[\"not valid\"]", "fn_name": "check_password"}, {"input": "\"P1@p\"", "output": "[\"not valid\"]", "fn_name": "check_password"}, {"input": "\"P1@pP1@p\"", "output": "[\"valid\"]", "... | code_functional |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nBessie is out grazing on the farm, which consists of $n$ fields connected by $m$ bidirectional roads. She is currently at field $1$, and will return to her home at field $n$ at the end of the day.\n\nThe Cowfederation of ... | [{"type": "stdin_stdout", "input": "42 41 20\n8 34 12 13 38 3 9 10 18 16 2 26 24 17 32 21 4 27 15 39\n1 35\n35 8\n1 31\n31 34\n1 40\n40 12\n1 30\n30 13\n1 33\n33 38\n1 37\n37 3\n1 22\n22 9\n1 20\n20 10\n1 25\n25 18\n1 14\n14 16\n1 42\n42 7\n7 2\n42 11\n11 26\n42 29\n29 24\n42 36\n36 17\n42 41\n41 32\n42 23\n23 21\n42 2... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nThere is a game that uses numbers called \"Fizz Buzz\". In this game, multiple players count the numbers one by one, starting with 1, and each player says only one number after the previous player. At that time, you must ... | [{"type": "stdin_stdout", "input": "5 7\n1\n-1\nFizz\n2\nzuzB\n5\n2\n16 5\n1\n4\n5\n7\n8\n0 0", "output": "3\n1 6 7 8 9 10 11 12 13 14 15 16\n"}, {"type": "stdin_stdout", "input": "14 7\n1\n0\nzzFi\n4\nBuzz\n11\n1\n3 5\n-1\n3\n8\n4\n3\n0 0", "output": "1 4 5 8 9 10 11 12 13 14\n3\n"}, {"type": "stdin_stdout", "input": ... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nChouti was doing a competitive programming competition. However, after having all the problems accepted, he got bored and decided to invent some small games.\n\nHe came up with the following game. The player has a positiv... | [{"type": "stdin_stdout", "input": "1000000000\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "1000000000\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "1236540828\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "1102703100\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "1266106036\n... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nIt is said that a legendary treasure left by Mr. Yao is sleeping somewhere in Hachioji long ago. The treasure map, which is said to show its whereabouts, has been handed down by Yao's n descendants, divided into several p... | [{"type": "stdin_stdout", "input": "4\n1 1\n2 0 -1\n2 4 2\n3 2 16 10\n0", "output": "-1\n"}, {"type": "stdin_stdout", "input": "4\n1 1\n2 0 0\n2 4 2\n3 2 16 10\n0", "output": "-1\n"}, {"type": "stdin_stdout", "input": "4\n1 1\n2 0 -1\n2 4 2\n3 2 16 2\n0", "output": "-1\n"}, {"type": "stdin_stdout", "input": "4\n1 1\n2 ... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nYou are given a sequence $b_1, b_2, \\ldots, b_n$. Find the lexicographically minimal permutation $a_1, a_2, \\ldots, a_{2n}$ such that $b_i = \\min(a_{2i-1}, a_{2i})$, or determine that it is impossible.\n\n\n-----Input-... | [{"type": "stdin_stdout", "input": "1\n100\n49 47 115 100 84 71 77 67 1 39 34 92 72 44 68 124 20 102 187 58 78 41 3 15 14 48 134 11 29 117 45 24 23 19 66 27 7 22 123 55 135 10 149 185 8 9 62 61 137 52 171 2 5 28 43 42 155 6 111 127 17 59 25 126 53 125 103 26 75 12 56 96 148 60 114 13 4 131 101 16 104 51 132 158 18 168 ... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nWe have an integer sequence of length N: A_0,A_1,\\cdots,A_{N-1}.\n\nFind the following sum (\\mathrm{lcm}(a, b) denotes the least common multiple of a and b):\n\n* \\sum_{i=0}^{N-2} \\sum_{j=i+1}^{N-1} \\mathrm{lcm}(A_i,... | [{"type": "stdin_stdout", "input": "10\n356822 296174 484500 710640 610703 888250 259161 609120 592348 713644", "output": "963903348\n"}, {"type": "stdin_stdout", "input": "10\n356822 296174 484500 710640 231537 888250 259161 609120 592348 713644", "output": "669101188\n"}, {"type": "stdin_stdout", "input": "10\n356822... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nYou're given a string of lower-case Latin letters. Your task is to find the length of its longest substring that can be met in the string at least twice. These occurrences can overlap (see sample test 2).\n\nInput\n\nThe ... | [{"type": "stdin_stdout", "input": "ipsrjylhpkjvlzncfixipstwcicxqygqcfrawpzzvckoveyqhathglblhpkjvlzncfixipfajaqobtzvthmhgbuawowoknirclxg\n", "output": "15\n"}, {"type": "stdin_stdout", "input": "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffbffffffffffffffffffffffgffffffffffffff\n", "output": "61\n"}, {... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nWrite function bmi that calculates body mass index (bmi = weight / height ^ 2).\n\n\nif bmi <= 18.5 return \"Underweight\"\n\nif bmi <= 25.0 return \"Normal\"\n\nif bmi <= 30.0 return \"Overweight\"\n\nif bmi > 30 return ... | [{"input": "50\n1.8", "output": "[\"Underweight\"]", "fn_name": "bmi"}, {"input": "90\n1.8", "output": "[\"Overweight\"]", "fn_name": "bmi"}, {"input": "80\n1.8", "output": "[\"Normal\"]", "fn_name": "bmi"}, {"input": "110\n1.8", "output": "[\"Obese\"]", "fn_name": "bmi"}, {"input": "50\n1.5", "output": "[\"Normal\"]",... | code_functional |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nCreate an OR function, without use of the 'or' keyword, that takes an list of boolean values and runs OR against all of them.\n\nAssume there will be between 1 and 6 variables, and return None for an empty list.\n\nWrite ... | [{"input": "[false, false, false, false, false, false]", "output": "[false]", "fn_name": "alt_or"}, {"input": "[false, false, false, false, false, true]", "output": "[true]", "fn_name": "alt_or"}, {"input": "[false, false, false, false, true, false]", "output": "[true]", "fn_name": "alt_or"}, {"input": "[false, false, ... | code_functional |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nSnuke has four cookies with deliciousness A, B, C, and D. He will choose one or more from those cookies and eat them. Is it possible that the sum of the deliciousness of the eaten cookies is equal to that of the remaining... | [{"type": "stdin_stdout", "input": "45445415 46908390 31865171 30402196\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "93407609 30427494 56229544 81174201\n", "output": "No\n"}, {"type": "stdin_stdout", "input": "76041209 81456309 25817729 23366690\n", "output": "No\n"}, {"type": "stdin_stdout", "input": "9... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nAs Will is stuck in the Upside Down, he can still communicate with his mom, Joyce, through the Christmas lights (he can turn them on and off with his mind). He can't directly tell his mom where he is, because the monster ... | [{"type": "stdin_stdout", "input": ")?(??((???????()?(?????????)??(????????((?)?????)????)??????(?????)?)?????)??????(??()??????)????????)?)()??????????????())????????(???)??)????????????????????(?????)??)???)??(???????????????)???)??)?\n", "output": "8314\n"}, {"type": "stdin_stdout", "input": "?)??)???)??????????????... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nIlya plays a card game by the following rules.\n\nA player has several cards. Each card contains two non-negative integers inscribed, one at the top of the card and one at the bottom. At the beginning of the round the pla... | [{"type": "stdin_stdout", "input": "100\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 0\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nIgor is in 11th grade. Tomorrow he will have to write an informatics test by the strictest teacher in the school, Pavel Denisovich.\n\nIgor knows how the test will be conducted: first of all, the teacher will give each st... | [{"type": "stdin_stdout", "input": "18\n2 3\n2 3\n2 3\n3 4\n1 4\n3 4\n160570 255604\n3 4\n3 5\n4 5\n1 5\n1 3\n1 2\n1 2\n113836 489816\n1 4\n2 4\n233746 254500\n", "output": "1\n1\n1\n1\n2\n1\n3271\n1\n2\n1\n1\n1\n1\n1\n17237\n2\n2\n3823\n"}, {"type": "stdin_stdout", "input": "14\n1 2\n51649 234369\n3 5\n2 4\n4 5\n2 3\n... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nProblem\n\nThere are n vertices that are not connected to any of the vertices.\nAn undirected side is stretched between each vertex.\nFind out how many sides can be stretched when the diameter is set to d.\nThe diameter r... | [{"type": "stdin_stdout", "input": "-11 14", "output": "287\n"}, {"type": "stdin_stdout", "input": "-14 17", "output": "449\n"}, {"type": "stdin_stdout", "input": "-11 18", "output": "393\n"}, {"type": "stdin_stdout", "input": "-1 20", "output": "207\n"}, {"type": "stdin_stdout", "input": "-6 11", "output": "128\n"}, {... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nThe only difference between easy and hard versions is the length of the string.\n\nYou are given a string $s$ and a string $t$, both consisting only of lowercase Latin letters. It is guaranteed that $t$ can be obtained fr... | [{"type": "stdin_stdout", "input": "ziurxtzxixmsmewfuffsqdkpphssdcgybwtmzavkosqtmcntspzvftqybaldjllvgttblectspqinfdhhnpvkcbwjlqlquajueqsgymyekuswjctumsbnvvaiinxjlzcnyixfaykolkeogufvzvhnatqtelgjkqfvexghiznwubwihjkznkhepjzrnyzftmimqtlihpn\nzurzximmewfuffskppsdcybwmzavkosqtmctspvftybaljlgtltsqinfdhhpvkcwjlqlqymykusctumsbn... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nThe Smart Beaver from ABBYY plans a space travel on an ultramodern spaceship. During the voyage he plans to visit n planets. For planet i ai is the maximum number of suitcases that an alien tourist is allowed to bring to ... | [{"type": "stdin_stdout", "input": "26 919241245\n302193 763904252\n302152 990010704\n453347 786598325\n302156 614790744\n151113 552970041\n151053 935503943\n453339 788648514\n453340 819457698\n604398 992471599\n453342 141598754\n302166 998869126\n151098 158907792\n453293 724150038\n604414 436248800\n604434 447578562\n... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nCreate a program that outputs all leap years between the year a and year b.\n\nThe leap year conditions are as follows. However, 0 <a β€ b <3,000. If there is no leap year in the given period, output \"NA\".\n\n* The year ... | [{"type": "stdin_stdout", "input": "265 2171\n1686 3636\n2001 2275\n0 0", "output": "268\n272\n276\n280\n284\n288\n292\n296\n304\n308\n312\n316\n320\n324\n328\n332\n336\n340\n344\n348\n352\n356\n360\n364\n368\n372\n376\n380\n384\n388\n392\n396\n400\n404\n408\n412\n416\n420\n424\n428\n432\n436\n440\n444\n448\n452\n456\n... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nRikhail Mubinchik believes that the current definition of prime numbers is obsolete as they are too complex and unpredictable. A palindromic number is another matter. It is aesthetically pleasing, and it has a number of r... | [{"type": "stdin_stdout", "input": "10000 239\n", "output": "1168638\n"}, {"type": "stdin_stdout", "input": "10000 1538\n", "output": "11620"}, {"type": "stdin_stdout", "input": "11275 615\n", "output": "263862"}, {"type": "stdin_stdout", "input": "10100 1538\n", "output": "11940"}, {"type": "stdin_stdout", "input": "1... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nSimon has a rectangular table consisting of n rows and m columns. Simon numbered the rows of the table from top to bottom starting from one and the columns β from left to right starting from one. We'll represent the cell ... | [{"type": "stdin_stdout", "input": "5 50\n0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nYou have invented a time-machine which has taken you back to ancient Rome. Caeser is impressed with your programming skills and has appointed you to be the new information security officer.\n\nCaeser has ordered you to wr... | [{"input": "\"This is a message\"\n0", "output": "[\"THIS IS A MESSAGE\"]", "fn_name": "caeser"}, {"input": "\"who are you?\"\n18", "output": "[\"OZG SJW QGM?\"]", "fn_name": "caeser"}, {"input": "\"final one\"\n9", "output": "[\"ORWJU XWN\"]", "fn_name": "caeser"}, {"input": "\"..5tyu..\"\n25", "output": "[\"..5SXT..\... | code_functional |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nYou have a set of $n$ discs, the $i$-th disc has radius $i$. Initially, these discs are split among $m$ towers: each tower contains at least one disc, and the discs in each tower are sorted in descending order of their ra... | [{"type": "stdin_stdout", "input": "10 10\n2 10 8 7 9 3 4 6 5 1\n10 4\n10 1\n10 6\n10 8\n10 2\n10 9\n10 7\n10 3\n10 5\n", "output": "9\n9\n9\n8\n7\n6\n6\n4\n2\n0\n"}, {"type": "stdin_stdout", "input": "10 10\n2 10 8 7 9 3 4 6 5 1\n10 4\n10 1\n10 6\n10 8\n10 2\n10 9\n10 7\n10 3\n10 5\n", "output": "9\n9\n9\n8\n7\n6\n6\n... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nWe have an N \\times N square grid.\nWe will paint each square in the grid either black or white.\nIf we paint exactly A squares white, how many squares will be painted black?\n\n-----Constraints-----\n - 1 \\leq N \\leq ... | [{"type": "stdin_stdout", "input": "19\n100\n", "output": "261\n"}, {"type": "stdin_stdout", "input": "10\n202", "output": "-102\n"}, {"type": "stdin_stdout", "input": "19\n110", "output": "251\n"}, {"type": "stdin_stdout", "input": "10\n-13", "output": "113\n"}, {"type": "stdin_stdout", "input": "10\n-16", "output": "... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nA new pack of n t-shirts came to a shop. Each of the t-shirts is characterized by three integers p_{i}, a_{i} and b_{i}, where p_{i} is the price of the i-th t-shirt, a_{i} is front color of the i-th t-shirt and b_{i} is ... | [{"type": "stdin_stdout", "input": "20\n414468312 20329584 106106409 584924603 666547477 670032002 726095027 276840253 368277336 940941705 531635095 213813062 440421387 959075599 240727854 495316522 838268432 786936631 586382273 806443734\n3 1 2 3 3 2 2 1 3 2 3 2 3 3 3 2 1 3 1 2\n3 1 2 2 2 2 3 1 2 3 2 1 1 2 3 1 2 3 3 2... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nA Garden with Ponds\n\nMr. Gardiner is a modern garden designer who is excellent at utilizing the terrain features. His design method is unique: he first decides the location of ponds and design them with the terrain feat... | [{"type": "stdin_stdout", "input": "3 3\n0 0 2\n0 1 2\n2 3 1\n3 5\n0 3 7 3 3\n4 1 0 2 3\n3 3 4 0 2\n7 7\n2 1 1 1 1 0 0\n1 0 0 0 1 0 0\n1 0 1 1 1 1 1\n1 0 0 0 2 0 1\n1 1 1 1 1 0 1\n0 0 2 1 0 1 1\n0 0 1 1 1 2 -1\n6 6\n1 1 1 1 2 2\n1 0 0 2 0 2\n1 0 -1 2 1 2\n3 3 3 15 13 9\n3 0 0 18 -1 9\n2 6 3 9 9 2\n0 0", "output": "0\n0... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\n*Inspired by the [Fold an Array](https://www.codewars.com/kata/fold-an-array) kata. This one is sort of similar but a little different.*\n\n---\n\n## Task\nYou will receive an array as parameter that contains 1 or more in... | [{"input": "[3, 234, 25, 345, 45, 34, 234, 235, 345, 34, 534, 45, 645, 645, 645, 4656, 45, 3]\n4", "output": "[[1040, 7712]]", "fn_name": "split_and_add"}, {"input": "[23, 345, 345, 345, 34536, 567, 568, 6, 34536, 54, 7546, 456]\n20", "output": "[[79327]]", "fn_name": "split_and_add"}, {"input": "[32, 45, 43, 23, 54, 2... | code_functional |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nA binary matrix is called good if every even length square sub-matrix has an odd number of ones. \n\nGiven a binary matrix $a$ consisting of $n$ rows and $m$ columns, determine the minimum number of cells you need to chan... | [{"type": "stdin_stdout", "input": "2 58\n1100001110010010100001000000000110110001101001100010101110\n1110110010101111001110010001100010001010100011111110110100\n", "output": "27\n"}, {"type": "stdin_stdout", "input": "2 58\n1100001110010010100001000000000110110001101001100010101110\n11101100101011110011100100011000100... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nWe have two integers: A and B.\nPrint the largest number among A + B, A - B, and A \\times B.\n\n-----Constraints-----\n - All values in input are integers.\n - -100 \\leq A,\\ B \\leq 100\n\n-----Input-----\nInput is giv... | [{"type": "stdin_stdout", "input": "100 100\n", "output": "10000\n"}, {"type": "stdin_stdout", "input": "-96 -16\n", "output": "1536\n"}, {"type": "stdin_stdout", "input": "36 80\n", "output": "2880\n"}, {"type": "stdin_stdout", "input": "-76 39\n", "output": "-37\n"}, {"type": "stdin_stdout", "input": "-13 3\n", "outp... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nA tourist is visiting Byteland. The tourist knows English very well. The language of Byteland is rather different from English. To be exact it differs in following points:\n\n- Bytelandian alphabet has the same letters as... | [{"type": "stdin_stdout", "input": "5 qwertyuiopasdfghjklzxcvbnm\nPh\nisscP\nBpke_kdc_epclc_jcijsc_mihyo?\nEpcf_kdc_liswhyo_EIED_hy_Vimcvpcn_Zkdvp_siyo_viyecle.\nIpp!", "output": "Hi\nolleH\nWhat are these people doing?\nThey are solving TOTR in Codechef March long contest.\nOhh!\n"}, {"type": "stdin_stdout", "input": ... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\n# Introduction \n\nA grille cipher was a technique for encrypting a plaintext by writing it onto a sheet of paper through a pierced sheet (of paper or cardboard or similar). The earliest known description is due to the po... | [{"input": "\"tcddoadepwweasresd\"\n77098", "output": "[\"codewars\"]", "fn_name": "grille"}, {"input": "\"abcdef\"\n5", "output": "[\"df\"]", "fn_name": "grille"}, {"input": "\"ab\"\n255", "output": "[\"ab\"]", "fn_name": "grille"}, {"input": "\"abcde\"\n32", "output": "[\"\"]", "fn_name": "grille"}, {"input": "\"abcd... | code_functional |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nYou are given a non-empty string s=s_1s_2... s_n, which consists only of lowercase Latin letters. Polycarp does not like a string if it contains at least one string \"one\" or at least one string \"two\" (or both at the s... | [{"type": "stdin_stdout", "input": "10\nonetwonetwooneooonetwooo\ntwo\none\ntwooooo\nttttwo\nttwwoo\nooone\nonnne\noneeeee\noneeeeeeetwooooo\n", "output": "6\n2 6 10 13 18 21 \n1\n2 \n1\n2 \n1\n2 \n1\n5 \n0\n\n1\n4 \n0\n\n1\n2 \n2\n2 11 \n"}, {"type": "stdin_stdout", "input": "10\nonetwonetwooneooonetwooo\ntwo\none\ntw... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nThe postal system in the area where Masa lives has changed a bit. In this area, each post office is numbered consecutively from 1 to a different number, and mail delivered to a post office is intended from that post offic... | [{"type": "stdin_stdout", "input": "4 5\n1 2 10\n1 3 15\n2 3 5\n2 4 3\n3 4 10\n2\n1 4 10 LoveLetter\n2 3 13 Greetings\n3 3\n1 2 1\n2 3 1\n3 1 1\n3\n1 2 1 BusinessMailC\n2 3 1 BusinessMailB\n3 1 1 BusinessMailA\n0 0", "output": "Greetings 18\nLoveLetter 26\n\nBusinessMailA 2\nBusinessMailB 2\nBusinessMailC 2\n"}, {"type... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nYou have been speeding on a motorway and a police car had to stop you. The policeman is a funny guy that likes to play games. Before issuing penalty charge notice he gives you a choice to change your penalty. \n\nYour pen... | [{"input": "[\"72\", \"7\", \"7\", \"78\", \"79\", \"709\", \"94\"]", "output": "[\"7097277787994\"]", "fn_name": "penalty"}, {"input": "[\"71\", \"82\", \"42\", \"34\", \"90\"]", "output": "[\"3442718290\"]", "fn_name": "penalty"}, {"input": "[\"45\", \"30\", \"50\", \"1\"]", "output": "[\"1304550\"]", "fn_name": "pen... | code_functional |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nComplete the square sum function so that it squares each number passed into it and then sums the results together.\n\nFor example, for `[1, 2, 2]` it should return `9` because `1^2 + 2^2 + 2^2 = 9`.\n\n```if:racket\nIn Ra... | [{"input": "[0, 3, 4, 5]", "output": "[50]", "fn_name": "square_sum"}, {"input": "[-1, 0, 1]", "output": "[2]", "fn_name": "square_sum"}, {"input": "[-1, -2]", "output": "[5]", "fn_name": "square_sum"}, {"input": "[1, 2]", "output": "[5]", "fn_name": "square_sum"}, {"input": "[]", "output": "[0]", "fn_name": "square_su... | code_functional |
[
{
"content": "Solve the following coding problem using the programming language python:\n\n## Enough is enough!\n\nAlice and Bob were on a holiday. Both of them took many pictures of the places they've been, and now they want to show Charlie their entire collection. However, Charlie doesn't like these sessions,... | [{"input": "[1, 2, 3, 1, 1, 2, 1, 2, 3, 3, 2, 4, 5, 3, 1]\n3", "output": "[[1, 2, 3, 1, 1, 2, 2, 3, 3, 4, 5]]", "fn_name": "delete_nth"}, {"input": "[1, 1, 3, 3, 7, 2, 2, 2, 2]\n3", "output": "[[1, 1, 3, 3, 7, 2, 2, 2]]", "fn_name": "delete_nth"}, {"input": "[1, 1, 1, 1, 1]\n5", "output": "[[1, 1, 1, 1, 1]]", "fn_name"... | code_functional |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nShuseki Kingdom is the world's leading nation for innovation and technology. There are n cities in the kingdom, numbered from 1 to n.\n\nThanks to Mr. Kitayuta's research, it has finally become possible to construct telep... | [{"type": "stdin_stdout", "input": "7 13\n6 1\n7 2\n3 7\n6 5\n3 6\n7 4\n3 5\n4 1\n3 1\n1 5\n1 6\n6 2\n2 4\n", "output": "7\n"}, {"type": "stdin_stdout", "input": "8 12\n6 1\n7 5\n2 5\n4 1\n6 3\n4 3\n5 7\n1 3\n5 2\n2 7\n4 6\n7 2\n", "output": "6\n"}, {"type": "stdin_stdout", "input": "8 12\n6 1\n7 5\n2 5\n4 1\n6 3\n4 3\... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nHaving stayed home alone, Petya decided to watch forbidden films on the Net in secret. \"What ungentlemanly behavior!\" β you can say that, of course, but don't be too harsh on the kid. In his country films about the Mart... | [{"type": "stdin_stdout", "input": "000:0010\n", "output": "2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 "}, {"type": "stdin_stdout", "input": "001:010\n", "output": "2 3 4 5 6 7 8 9 10 11 12 13 14 1... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nPig Latin is an English language game where the goal is to hide the meaning of a word from people not aware of the rules.\n\nSo, the goal of this kata is to wite a function that encodes a single word string to pig latin.\... | [{"input": "\"yaYAya\"", "output": "[\"ayayayay\"]", "fn_name": "pig_latin"}, {"input": "\"YayayA\"", "output": "[\"ayayayay\"]", "fn_name": "pig_latin"}, {"input": "\"Hello\"", "output": "[\"ellohay\"]", "fn_name": "pig_latin"}, {"input": "\"CCCC\"", "output": "[\"ccccay\"]", "fn_name": "pig_latin"}, {"input": "\"tes3... | code_functional |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nMy arm is stuck and I can't pull it out.\n\nI tried to pick up something that had rolled over to the back of my desk, and I inserted my arm while illuminating it with the screen of my cell phone instead of a flashlight, b... | [{"type": "stdin_stdout", "input": "1\n11\n111111\n111111111111\n12345\n11111111119999999999\n11111111113333333333\n11111111118888888888\n11111111112222222222111111111\n11111111110000000000444444444\n11224111122411\n888888888888999999999999888888888888999999999999999999\n666666666666666777333333333338888888888\n1111114... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nproblem\n\nDuring this time of winter in Japan, hot days continue in Australia in the Southern Hemisphere. IOI, who lives in Australia, decided to plan what clothes to wear based on the weather forecast for a certain D da... | [{"type": "stdin_stdout", "input": "3 4\n31\n27\n35\n20 25 30\n23 29 90\n21 35 60\n28 48 40", "output": "100\n"}, {"type": "stdin_stdout", "input": "3 4\n31\n27\n35\n20 25 30\n23 29 90\n21 35 60\n28 48 25", "output": "130\n"}, {"type": "stdin_stdout", "input": "3 4\n34\n40\n44\n38 25 30\n24 29 11\n21 69 99\n28 43 40", ... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nStudent Vladislav came to his programming exam completely unprepared as usual. He got a question about some strange algorithm on a graph β something that will definitely never be useful in real life. He asked a girl sitti... | [{"type": "stdin_stdout", "input": "10 15\n900000001 1\n900000001 1\n900000002 1\n1737646700 1\n900000001 0\n900000001 1\n900000001 0\n900000001 0\n900000001 0\n900000001 1\n900000001 0\n900000001 0\n900000004 1\n900000000 1\n900000001 1\n", "output": "1 3\n1 4\n1 8\n1 10\n2 3\n1 5\n2 4\n3 4\n2 5\n1 6\n3 5\n4 5\n1 9\n1... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nYura has been walking for some time already and is planning to return home. He needs to get home as fast as possible. To do this, Yura can use the instant-movement locations around the city.\n\nLet's represent the city as... | [{"type": "stdin_stdout", "input": "995078784 16\n623812784 347467913 233267735 582455459\n355611107 277980472\n78770458 786182235\n815219022 611815511\n786044046 363376661\n290398527 1777289213\n846155104 388600335\n143085949 155695413\n287078777 918827034\n432395923 126620751\n52941102 329010981\n237509699 571287936\... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nUser ainta is making a web site. This time he is going to make a navigation of the pages. In his site, there are n pages numbered by integers from 1 to n. Assume that somebody is on the p-th page now. The navigation will ... | [{"type": "stdin_stdout", "input": "100 10 100\n", "output": "1 2 3 4 5 6 7 8 9 (10) 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 8... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nLittle Alyona is celebrating Happy Birthday! Her mother has an array of n flowers. Each flower has some mood, the mood of i-th flower is a_{i}. The mood can be positive, zero or negative.\n\nLet's define a subarray as a s... | [{"type": "stdin_stdout", "input": "86 30\n16 -12 11 16 8 14 7 -29 18 30 -32 -10 20 29 -14 -21 23 -19 -15 17 -2 25 -22 2 26 15 -7 -12 -4 -28 21 -4 -2 22 28 -32 9 -20 23 38 -21 21 37 -13 -30 25 31 6 18 29 29 29 27 38 -15 -32 32 -7 -8 -33 -11 24 23 -19 -36 -36 -18 9 -1 32 -34 -26 1 -1 -16 -14 17 -17 15 -24 38 5 -27 -12 8... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\n# Background\n\n\nMy TV remote control has arrow buttons and an `OK` button.\n\nI can use these to move a \"cursor\" on a logical screen keyboard to type words...\n\n# Keyboard\n\nThe screen \"keyboard\" layout looks like... | [{"input": "\"The Quick Brown Fox Jumps Over A Lazy Dog.\"", "output": "[254]", "fn_name": "tv_remote"}, {"input": "\"Pack My Box With Five Dozen Liquor Jugs.\"", "output": "[242]", "fn_name": "tv_remote"}, {"input": "\" x X \"", "output": "[30]", "fn_name": "tv_remote"}, {"input": "\"MISSISSIPPI\"", "output": ... | code_functional |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nMainak has an array $a_1, a_2, \\ldots, a_n$ of $n$ positive integers. He will do the following operation to this array exactly once:\n\nPick a subsegment of this array and cyclically rotate it by any amount.\n\nFormally,... | [{"type": "stdin_stdout", "input": "50\n1\n999\n1\n998\n1\n997\n1\n996\n1\n995\n1\n994\n1\n993\n1\n992\n1\n991\n1\n990\n1\n989\n1\n988\n1\n987\n1\n986\n1\n985\n1\n984\n1\n983\n1\n982\n1\n981\n1\n980\n1\n979\n1\n978\n1\n977\n1\n976\n1\n975\n1\n974\n1\n973\n1\n972\n1\n971\n1\n970\n1\n969\n1\n968\n1\n967\n1\n966\n1\n965\n... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nVasya has n items lying in a line. The items are consecutively numbered by numbers from 1 to n in such a way that the leftmost item has number 1, the rightmost item has number n. Each item has a weight, the i-th item weig... | [{"type": "stdin_stdout", "input": "2 100 100 10000 10000\n100 100\n", "output": "20000\n"}, {"type": "stdin_stdout", "input": "2 100 100 10000 10000\n100 100\n", "output": "20000\n"}, {"type": "stdin_stdout", "input": "2 100 100 00000 10000\n100 100\n", "output": "20000\n"}, {"type": "stdin_stdout", "input": "2 100 10... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nIn the spirit of the holidays, Saitama has given Genos two grid paths of length n (a weird gift even by Saitama's standards). A grid path is an ordered sequence of neighbouring squares in an infinite grid. Two squares are... | [{"type": "stdin_stdout", "input": "200\nNESENEESEESWWWNWWSWSWNWNNWNNESWSWNNWNWNENESENNESSWSESWWSSSEEEESSENNNESSWWSSSSESWSWWNNEESSWWNNWSWSSWWNWNNEENNENWWNESSSENWNESWNESWNESEESSWNESSSSSESESSWNNENENESSWWNNWWSWWNESEENWWWWNWWNWWNENESESSWWSWWSES\nNWNESESSENNNESWNWWSWWWNWSESSSWWNWWNNWSENWSWNENNNWWSWWSWNNNESWWWSSESSWWWSSENWSE... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nBeroffice text editor has a wide range of features that help working with text. One of the features is an automatic search for typos and suggestions of how to fix them.\n\nBeroffice works only with small English letters (... | [{"type": "stdin_stdout", "input": "bddabcdfaccdabcdfadddabcdfabbdabcdfacddabcdfacdbabcdfacbbabcdfacbcabcdfacbdabcdfadbbabcdfabdbabcdfabdcabcdfabbcabcdfabccabcdfabbbabcdfaddcabcdfaccbabcdfadbdabcdfacccabcdfadcdabcdfadcbabcdfabcbabcdfadbcabcdfacdcabcdfabcdabcdfadccabcdfaddb\n", "output": "bd dabc dfacc dabc dfadddabc df... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nAn ordered sequence of numbers from 1 to N is given. One number might have deleted from it, then the remaining numbers were mixed. Find the number that was deleted.\n\nExample: \n - The starting array sequence is `[1,2,3,... | [{"input": "[1, 2, 3, 4, 5, 6, 7, 8, 9]\n[5, 7, 6, 9, 4, 8, 1, 2, 3]", "output": "[0]", "fn_name": "find_deleted_number"}, {"input": "[1, 2, 3, 4, 5, 6, 7, 8, 9]\n[5, 7, 9, 4, 8, 1, 2, 3]", "output": "[6]", "fn_name": "find_deleted_number"}, {"input": "[1, 2, 3, 4, 5, 6, 7]\n[2, 3, 6, 1, 5, 4, 7]", "output": "[0]", "fn... | code_functional |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nA string a of length m is called antipalindromic iff m is even, and for each i (1 β€ i β€ m) a_{i} β a_{m} - i + 1.\n\nIvan has a string s consisting of n lowercase Latin letters; n is even. He wants to form some string t t... | [{"type": "stdin_stdout", "input": "100\nadebebcdacabaadcbcdebcccdaadaeeedecdbcbdeddcbcaeedbecaeeabaabbdccaebdebabbabdcebbbdaabdbddcadaddadad\n52 62 28 18 100 84 16 53 43 52 49 92 10 64 50 95 90 52 21 14 60 3 94 63 31 70 74 62 93 75 100 96 58 36 76 40 62 74 91 77 92 78 65 11 50 18 79 29 10 25 4 24 44 39 4 91 81 63 97 6... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nYou will be given an array of numbers.\n\nFor each number in the array you will need to create an object. \n\nThe object key will be the number, as a string. The value will be the corresponding character code, as a string... | [{"input": "[107, 99, 110, 107, 118, 106, 112, 102]", "output": "[[{\"107\": \"k\"}, {\"99\": \"c\"}, {\"110\": \"n\"}, {\"107\": \"k\"}, {\"118\": \"v\"}, {\"106\": \"j\"}, {\"112\": \"p\"}, {\"102\": \"f\"}]]", "fn_name": "num_obj"}, {"input": "[101, 121, 110, 113, 113, 103]", "output": "[[{\"101\": \"e\"}, {\"121\":... | code_functional |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nPermutation p is an ordered set of integers p_1, p_2, ..., p_{n}, consisting of n distinct positive integers, each of them doesn't exceed n. We'll denote the i-th element of permutation p as p_{i}. We'll call number n ... | [{"type": "stdin_stdout", "input": "100\n-77 57 -95 -23 53 -29 82 -83 38 -73 85 28 25 6 -16 4 -10 -30 -9 -92 14 34 -93 61 36 -100 90 -68 28 16 100 -4 49 23 36 -87 62 -62 53 74 -50 -2 102 8 22 -30 -19 83 7 84 43 90 -65 -75 -15 97 90 15 66 2 13 -91 91 -44 62 51 51 -58 95 77 20 45 76 79 91 60 76 2 82 42 -130 94 -70 122 65... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nA permutation is a sequence of integers p_1, p_2, ..., p_{n}, consisting of n distinct positive integers, each of them doesn't exceed n. Let's denote the i-th element of permutation p as p_{i}. We'll call number n the siz... | [{"type": "stdin_stdout", "input": "102\n", "output": "2 1 4 3 6 5 8 7 10 9 12 11 14 13 16 15 18 17 20 19 22 21 24 23 26 25 28 27 30 29 32 31 34 33 36 35 38 37 40 39 42 41 44 43 46 45 48 47 50 49 52 51 54 53 56 55 58 57 60 59 62 61 64 63 66 65 68 67 70 69 72 71 74 73 76 75 78 77 80 79 82 81 84 83 86 85 88 87 90 89 92 9... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nN friends of Takahashi has come to a theme park.\nTo ride the most popular roller coaster in the park, you must be at least K centimeters tall.\nThe i-th friend is h_i centimeters tall.\nHow many of the Takahashi's friend... | [{"type": "stdin_stdout", "input": "81 358\n59 53 2 54 462 325 435 279 464 327 49 332 95 200 220 158 139 492 130 467 489 458 81 100 466 473 429 275 81 270 455 218 128 307 335 398 52 30 311 69 148 384 454 413 114 315 186 334 382 392 326 8 53 462 457 350 231 61 185 88 305 480 64 390 52 247 443 240 93 469 370 16 443 7 25 ... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nVasya is choosing a laptop. The shop has n laptops to all tastes.\n\nVasya is interested in the following properties: processor speed, ram and hdd. Vasya is a programmer and not a gamer which is why he is not interested i... | [{"type": "stdin_stdout", "input": "27\n1689 1927 40 270\n3833 2570 167 134\n2580 3589 390 300\n1898 2587 407 316\n1841 2772 411 187\n1296 288 407 506\n1215 263 236 307\n2737 1427 84 992\n1107 1879 284 866\n3311 2507 475 147\n2951 2214 209 375\n1352 2582 110 324\n2082 747 289 521\n2226 1617 209 108\n2253 1993 109 835\n... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nA programming competition site AtCode regularly holds programming contests.\nThe next contest on AtCode is called ABC, which is rated for contestants with ratings less than 1200.\nThe contest after the ABC is called ARC, ... | [{"type": "stdin_stdout", "input": "1199\n", "output": "ABC\n"}, {"type": "stdin_stdout", "input": "1200\n", "output": "ARC\n"}, {"type": "stdin_stdout", "input": "4208\n", "output": "AGC\n"}, {"type": "stdin_stdout", "input": "1234\n", "output": "ARC\n"}, {"type": "stdin_stdout", "input": "2799\n", "output": "ARC\n"},... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nYou are given integers N and K. Find the number of triples (a,b,c) of positive integers not greater than N such that a+b,b+c and c+a are all multiples of K. The order of a,b,c does matter, and some of them can be the same... | [{"type": "stdin_stdout", "input": "150607 162", "output": "1606122089\n"}, {"type": "stdin_stdout", "input": "101525 92", "output": "2687492591\n"}, {"type": "stdin_stdout", "input": "101525 162", "output": "491806259\n"}, {"type": "stdin_stdout", "input": "35897 92", "output": "118638000\n"}, {"type": "stdin_stdout",... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nSquare1001 has seen an electric bulletin board displaying the integer 1.\nHe can perform the following operations A and B to change this value:\n - Operation A: The displayed value is doubled.\n - Operation B: The display... | [{"type": "stdin_stdout", "input": "10\n-32", "output": "-16128\n"}, {"type": "stdin_stdout", "input": "10\n-23", "output": "-11520\n"}, {"type": "stdin_stdout", "input": "10\n-37", "output": "-18688\n"}, {"type": "stdin_stdout", "input": "10\n-42", "output": "-21248\n"}, {"type": "stdin_stdout", "input": "10\n-33", "o... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nDZY loves Physics, and he enjoys calculating density.\n\nAlmost everything has density, even a graph. We define the density of a non-directed graph (nodes and edges of the graph have some values) as follows: \n\n<image> w... | [{"type": "stdin_stdout", "input": "20 20\n265918 744212 196368 74731 293587 679367 460805 632939 453630 565881 835276 606327 181087 721045 219431 849838 370939 582350 335676 32244\n2 16 989\n14 19 628\n1 9 483\n5 8 733\n13 19 556\n10 17 911\n1 7 599\n13 17 390\n10 20 965\n17 11 449\n3 15 310\n3 6 557\n14 18 225\n1 18 ... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nYou are given a non-empty string s consisting of lowercase English letters. You have to pick exactly one non-empty substring of s and shift all its letters 'z' $\\rightarrow$ 'y' $\\rightarrow$ 'x' $\\rightarrow \\ldots \... | [{"type": "stdin_stdout", "input": "abbbbbbbabbbbbbbbbbbbbbbbbbbbbbbabbabbbbbabbbbbbbbbbbabbbbbbbbabbabbbbbbbbbbbbbbabbabbbaababbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbabbabbbbbbbbbbbbbbbbabbbbabbbbbbbbbbbbbbbabbbbbbbbbaababbbbbbbbabbbbbbbbbbbbbbbbbbbbbbbbbbbbabbbbbbbbbbbbbbbbbbbbabbabbbbbbbbbbbbbbbbabbbabbbbbaabbabbbbbbbbb... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nToday, Chef woke up to find that he had no clean socks. Doing laundry is such a turn-off for Chef, that in such a situation, he always buys new socks instead of cleaning the old dirty ones. He arrived at the fashion store... | [{"type": "stdin_stdout", "input": "1 2 3\n\n\n", "output": "Unlucky Chef\n"}, {"type": "stdin_stdout", "input": "-1 4 14", "output": "Unlucky Chef\n"}, {"type": "stdin_stdout", "input": "1 2 6\n\n\n", "output": "Lucky Chef\n"}, {"type": "stdin_stdout", "input": "1 2 11", "output": "Unlucky Chef\n"}, {"type": "stdin_st... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nLittle Petya often travels to his grandmother in the countryside. The grandmother has a large garden, which can be represented as a rectangle 1 Γ n in size, when viewed from above. This rectangle is divided into n equal s... | [{"type": "stdin_stdout", "input": "100\n1 2 3 7 5 6 10 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 30 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 1 82 83 84 85 86 87 88 89 90 91 92 93 94 100 5 ... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nNastya just made a huge mistake and dropped a whole package of rice on the floor. Mom will come soon. If she sees this, then Nastya will be punished.\n\nIn total, Nastya dropped $n$ grains. Nastya read that each grain wei... | [{"type": "stdin_stdout", "input": "5\n7 20 3 101 18\n11 11 10 234 2\n8 9 7 250 122\n19 41 21 321 10\n3 10 8 6 1\n", "output": "Yes\nNo\nYes\nNo\nYes\n"}, {"type": "stdin_stdout", "input": "5\n7 20 3 101 18\n11 11 10 234 2\n8 9 7 250 122\n19 41 21 321 10\n3 10 8 6 1\n", "output": "Yes\nNo\nYes\nNo\nYes\n"}, {"type": "s... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nWrite a function that accepts a string, and returns true if it is in the form of a phone number. Assume that any integer from 0-9 in any of the spots will produce a valid phone number.\n\nOnly worry about the following fo... | [{"input": "\"abc(123) 456-7890abc\"", "output": "[false]", "fn_name": "validPhoneNumber"}, {"input": "\"abc(123)456-7890abc\"", "output": "[false]", "fn_name": "validPhoneNumber"}, {"input": "\"abc(123) 456-7890\"", "output": "[false]", "fn_name": "validPhoneNumber"}, {"input": "\"(123) 456-7890abc\"", "output": "[fal... | code_functional |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nThe Happy Farm 5 creators decided to invent the mechanism of cow grazing. The cows in the game are very slow and they move very slowly, it can even be considered that they stand still. However, carnivores should always be... | [{"type": "stdin_stdout", "input": "60\n-20 179\n-68 0\n-110 68\n-22 177\n47 140\n-49 -4\n-106 38\n-23 22\n20 193\n47 173\n-23 22\n-100 32\n-97 29\n47 124\n-49 -4\n20 193\n-20 179\n-50 149\n-59 -7\n4 193\n-23 22\n-97 29\n-23 22\n-66 133\n47 167\n-61 138\n-49 -4\n-91 108\n-110 84\n47 166\n-110 77\n-99 100\n-23 22\n-59 -... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nAtCoder Inc. holds a contest every Saturday.\nThere are two types of contests called ABC and ARC, and just one of them is held at a time.\nThe company holds these two types of contests alternately: an ARC follows an ABC a... | [{"type": "stdin_stdout", "input": "ABC\n", "output": "ARC\n"}, {"type": "stdin_stdout", "input": "ARC\n", "output": "ABC\n"}, {"type": "stdin_stdout", "input": "ARC\n", "output": "ABC\n"}, {"type": "stdin_stdout", "input": "ARC\n", "output": "ABC\n"}, {"type": "stdin_stdout", "input": "ABC", "output": "ARC"}] | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nWhen you asked some guy in your class his name, he called himself S, where S is a string of length between 3 and 20 (inclusive) consisting of lowercase English letters. You have decided to choose some three consecutive ch... | [{"type": "stdin_stdout", "input": "sakahashi", "output": "sak\n"}, {"type": "stdin_stdout", "input": "sbkahashi", "output": "sbk\n"}, {"type": "stdin_stdout", "input": "ihsahakbs", "output": "ihs\n"}, {"type": "stdin_stdout", "input": "hhsaiakbr", "output": "hhs\n"}, {"type": "stdin_stdout", "input": "rbkaiashh", "out... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nGiven a string as input, move all of its vowels to the end of the string, in the same order as they were before.\n\nVowels are (in this kata): `a, e, i, o, u`\n\nNote: all provided input strings are lowercase.\n\n## Examp... | [{"input": "\"programming\"", "output": "[\"prgrmmngoai\"]", "fn_name": "move_vowels"}, {"input": "\"javascript\"", "output": "[\"jvscrptaai\"]", "fn_name": "move_vowels"}, {"input": "\"haskell\"", "output": "[\"hskllae\"]", "fn_name": "move_vowels"}, {"input": "\"clojure\"", "output": "[\"cljroue\"]", "fn_name": "move... | code_functional |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nThe Fair Nut found a string $s$. The string consists of lowercase Latin letters. The Nut is a curious guy, so he wants to find the number of strictly increasing sequences $p_1, p_2, \\ldots, p_k$, such that: For each $i... | [{"type": "stdin_stdout", "input": "babbbaaaaaabbbaabaaaaaoaabababaababaaaaababaaaaaaabbbbbbaaapaabaaabaaababaaaabaaaabaaaaababaaaabaaab\n", "output": "813881762\n"}, {"type": "stdin_stdout", "input": "babbbaaaaaabbbaabaaaaaoaabababaababaaaaababaaaaaaabbbbbbaaapaabaaabaaababaaaabbaaabaaaaababaaaabaaab\n", "output": "45... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\n$N$ persons visited a restaurant. The restaurant is open from 0 to $T$. The $i$-th person entered the restaurant at $l_i$ and left at $r_i$. Find the maximum number of persons during the business hours.\n\nConstraints\n\n... | [{"type": "stdin_stdout", "input": "0 12\n1 -1\n1 4\n0 8\n0 11\n6 19\n7 21", "output": "0\n"}, {"type": "stdin_stdout", "input": "0 12\n0 -1\n1 4\n0 8\n0 11\n6 19\n7 21", "output": "0\n"}, {"type": "stdin_stdout", "input": "0 12\n1 0\n1 14\n0 0\n0 11\n6 19\n7 32", "output": "0\n"}, {"type": "stdin_stdout", "input": "0 ... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nWhen Darth Vader gets bored, he sits down on the sofa, closes his eyes and thinks of an infinite rooted tree where each node has exactly n sons, at that for each node, the distance between it an its i-th left child equals... | [{"type": "stdin_stdout", "input": "97 78153\n2 2 1 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 4 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 1 2 2 2 1 2 2 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 2\n", "output": "620983468\n"}, {"type": "stdin_stdout", "input": "97 78153\n2 2 1... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nYou are given a permutation of 1,2,...,N: p_1,p_2,...,p_N. Determine if the state where p_i=i for every i can be reached by performing the following operation any number of times:\n - Choose three elements p_{i-1},p_{i},p... | [{"type": "stdin_stdout", "input": "7\n3\n2\n1\n6\n5\n4\n7\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "7\n4\n2\n1\n6\n5\n4\n14", "output": "No\n"}, {"type": "stdin_stdout", "input": "7\n4\n2\n1\n11\n5\n4\n7", "output": "No\n"}, {"type": "stdin_stdout", "input": "7\n4\n2\n1\n6\n5\n4\n7", "output": "No\n"}... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nAlice and Bob are playing a fun game of tree tag.\n\nThe game is played on a tree of $n$ vertices numbered from $1$ to $n$. Recall that a tree on $n$ vertices is an undirected, connected graph with $n-1$ edges.\n\nInitial... | [{"type": "stdin_stdout", "input": "10\n10 9 10 6 6\n6 1\n7 6\n4 2\n6 10\n5 1\n9 5\n6 8\n3 4\n4 10\n2 1 2 1 1\n2 1\n9 7 4 2 3\n5 1\n2 4\n4 8\n8 6\n8 9\n7 8\n1 8\n1 3\n11 1 11 6 8\n1 10\n6 11\n8 2\n11 3\n1 7\n11 4\n5 8\n11 7\n1 9\n1 8\n5 3 2 1 1\n3 1\n2 1\n4 5\n1 5\n2 1 2 1 1\n2 1\n2 2 1 1 1\n2 1\n2 2 1 1 1\n1 2\n2 2 1 ... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nPlease write a function that sums a list, but ignores any duplicate items in the list.\n\nFor instance, for the list [3, 4, 3, 6] , the function should return 10.\n\nWrite your solution by modifying this code:\n\n```pytho... | [{"input": "[6, 7, 6, 6, 8, 0, 2, 0, 3, 2, 3, 0, 9, 10, 4, 8, 5, 1, 6, 3, 4, 3, 3, 4, 6, 8, 7, 6, 2, 2, 6, 9, 1, 9, 2, 1, 1, 0, 9, 9, 9, 4, 3, 6, 1, 2, 1, 9, 9, 9, 7, 4, 6, 6, 0, 8, 10, 9, 0, 7, 0, 7, 2, 4, 7, 9, 0, 4, 9, 3, 5, 7, 4, 6, 9, 1, 10, 10, 5, 0, 2, 3, 10, 10, 10, 2, 8, 7, 4, 8, 5, 10, 4, 9, 4, 5, 3, 9, 3, 5,... | code_functional |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nBizon the Champion is called the Champion for a reason. \n\nBizon the Champion has recently got a present β a new glass cupboard with n shelves and he decided to put all his presents there. All the presents can be divided... | [{"type": "stdin_stdout", "input": "100 100 100\n100 100 100\n100\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "100 100 100\n100 100 100\n100\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "100 100 100\n101 100 100\n100\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "100 100 000\n101 ... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nTwo foxes Jiro and Saburo are playing a game called 1D Reversi. This game is played on a board, using black and white stones. On the board, stones are placed in a row, and each player places a new stone to either end of t... | [{"type": "stdin_stdout", "input": "WBWBWBWBWB\n", "output": "9\n"}, {"type": "stdin_stdout", "input": "WBWBWBBBWW", "output": "6\n"}, {"type": "stdin_stdout", "input": "WWBBCWBWBV", "output": "7\n"}, {"type": "stdin_stdout", "input": "XWBBCWBWBV", "output": "8\n"}, {"type": "stdin_stdout", "input": "XWVBCWBWCB", "outp... | code_stdio |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.