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\nCaisa is going to have a party and he needs to buy the ingredients for a big chocolate cake. For that he is going to the biggest supermarket in town.\n\nUnfortunately, he has just s dollars for sugar. But that's not a rea... | [{"type": "stdin_stdout", "input": "69 9\n39 15\n70 44\n90 89\n84 58\n83 97\n24 28\n90 18\n7 96\n43 86\n99 50\n77 12\n12 34\n100 19\n21 86\n55 30\n99 29\n26 92\n82 67\n78 14\n64 16\n98 12\n31 39\n36 86\n73 36\n87 29\n42 23\n58 15\n35 52\n91 56\n39 6\n88 45\n38 36\n57 12\n79 71\n40 33\n98 42\n34 36\n23 79\n69 68\n50 47\... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nLunar New Year is approaching, and Bob is planning to go for a famous restaurant — \"Alice's\".\n\nThe restaurant \"Alice's\" serves $n$ kinds of food. The cost for the $i$-th kind is always $c_i$. Initially, the restaura... | [{"type": "stdin_stdout", "input": "10 15\n132 138 38 75 14 115 129 68 119 118\n728344 513371 120930 757031 137753 453796 348671 185533 966778 521678\n4 58\n1 8\n8 22\n3 98\n2 111\n6 158\n2 82\n1 170\n1 26\n1 4\n4 76\n10 106\n5 100\n4 116\n7 62\n", "output": "43907798\n5826752\n4081726\n15058400\n56984181\n67179393\n33... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nMy washing machine uses ```water``` amount of water to wash ```clothes``` amount of clothes. You are given a ```load``` amount of clothes to wash. For each single item of load above the standard amount of clothes, the wa... | [{"input": "10\n10\n2", "output": "[\"Not enough clothes\"]", "fn_name": "how_much_water"}, {"input": "10\n10\n21", "output": "[\"Too much clothes\"]", "fn_name": "how_much_water"}, {"input": "50\n15\n29", "output": "[189.87]", "fn_name": "how_much_water"}, {"input": "10\n11\n20", "output": "[23.58]", "fn_name": "how_m... | code_functional |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nMedicine faculty of Berland State University has just finished their admission campaign. As usual, about $80\\%$ of applicants are girls and majority of them are going to live in the university dormitory for the next $4$ ... | [{"type": "stdin_stdout", "input": "10\n5620 2478 4051 7060 10510 2170 6912 2031 1781 7454\n1 1 1 1 1 1 1 1 1 1\n", "output": "5620\n"}, {"type": "stdin_stdout", "input": "10\n5620 1555 4051 7060 10510 2170 6912 2031 1781 7454\n1 1 1 1 1 1 1 1 1 1\n", "output": "5620\n"}, {"type": "stdin_stdout", "input": "10\n7846 835... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nCount how often sign changes in array.\n\n### result\nnumber from `0` to ... . Empty array returns `0`\n\n### example\n\nWrite your solution by modifying this code:\n\n```python\ndef catch_sign_change(lst):\n\t\n```\n\nYo... | [{"input": "[1, -2, -7, -4, 4, -2, 0, -3, 3]", "output": "[6]", "fn_name": "catch_sign_change"}, {"input": "[-2, -2, -5, -4, 5, 2, 0, 6, 0]", "output": "[1]", "fn_name": "catch_sign_change"}, {"input": "[-8, 4, -1, 5, -3, -3, -2, -2]", "output": "[4]", "fn_name": "catch_sign_change"}, {"input": "[13, -7, -6, 2, -1, 1, ... | code_functional |
[
{
"content": "Solve the following coding problem using the programming language python:\n\n- Kids drink toddy.\n- Teens drink coke.\n- Young adults drink beer.\n- Adults drink whisky.\n\nMake a function that receive age, and return what they drink.\n\n**Rules:**\n\n- Children under 14 old.\n- Teens under 18 old... | [{"input": "22", "output": "[\"drink whisky\"]", "fn_name": "people_with_age_drink"}, {"input": "21", "output": "[\"drink whisky\"]", "fn_name": "people_with_age_drink"}, {"input": "13", "output": "[\"drink toddy\"]", "fn_name": "people_with_age_drink"}, {"input": "0", "output": "[\"drink toddy\"]", "fn_name": "people_... | code_functional |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nDee is lazy but she's kind and she likes to eat out at all the nice restaurants and gastropubs in town. To make paying quick and easy she uses a simple mental algorithm she's called The Fair %20 Rule. She's gotten so good... | [{"input": "125\n1", "output": "[14]", "fn_name": "calc_tip"}, {"input": "125\n0", "output": "[12]", "fn_name": "calc_tip"}, {"input": "125\n-1", "output": "[5]", "fn_name": "calc_tip"}, {"input": "144\n1", "output": "[15]", "fn_name": "calc_tip"}, {"input": "144\n0", "output": "[13]", "fn_name": "calc_tip"}, {"input":... | code_functional |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nFor a sequence of integers $A = \\\\{a_0, a_1, ..., a_{n-1}\\\\}$ which is sorted by ascending order, eliminate all equivalent elements.\n\nConstraints\n\n* $1 \\leq n \\leq 100,000$\n* $-1000,000,000 \\leq a_i \\leq 1,00... | [{"type": "stdin_stdout", "input": "4\n-2 -1 1 2", "output": "-2 -1 1 2\n"}, {"type": "stdin_stdout", "input": "4\n-2 -1 0 2", "output": "-2 -1 0 2\n"}, {"type": "stdin_stdout", "input": "4\n-2 -1 0 4", "output": "-2 -1 0 4\n"}, {"type": "stdin_stdout", "input": "4\n-1 0 1 10", "output": "-1 0 1 10\n"}, {"type": "stdin... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nThe vowel substrings in the word `codewarriors` are `o,e,a,io`. The longest of these has a length of 2. Given a lowercase string that has alphabetic characters only (both vowels and consonants) and no spaces, return the l... | [{"input": "\"ultrarevolutionariees\"", "output": "[3]", "fn_name": "solve"}, {"input": "\"chrononhotonthuooaos\"", "output": "[5]", "fn_name": "solve"}, {"input": "\"iiihoovaeaaaoougjyaw\"", "output": "[8]", "fn_name": "solve"}, {"input": "\"strengthlessnesses\"", "output": "[1]", "fn_name": "solve"}, {"input": "\"cub... | code_functional |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nAndrew often reads articles in his favorite magazine 2Char. The main feature of these articles is that each of them uses at most two distinct letters. Andrew decided to send an article to the magazine, but as he hasn't wr... | [{"type": "stdin_stdout", "input": "31\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "31\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\n... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nPolygons are the most fundamental objects in geometric processing. Complex figures are often represented and handled as polygons with many short sides. If you are interested in the processing of geometric data, you'd bett... | [{"type": "stdin_stdout", "input": "3\n1 1\n3 4\n6 -1\n\n7\n1 -1\n10 10\n-1 20\n3 33\n0 70\n100 40\n100 -1\n\n0", "output": "1 9.5\n2 5426.0\n"}, {"type": "stdin_stdout", "input": "3\n1 1\n3 4\n6 -1\n\n7\n1 -1\n10 10\n-1 20\n3 33\n0 40\n100 40\n100 0\n\n0", "output": "1 9.5\n2 3921.5\n"}, {"type": "stdin_stdout", "inpu... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nFarmer Bob have a big farm, where he growths chickens, rabbits and cows. It is very difficult to count the number of animals for each type manually, so he diceded to buy a system to do it. But he bought a cheap system tha... | [{"input": "152\n38\n34", "output": "[{\"rabbits\": 21, \"chickens\": 0, \"cows\": 17}]", "fn_name": "get_animals_count"}, {"input": "154\n42\n10", "output": "[{\"rabbits\": 30, \"chickens\": 7, \"cows\": 5}]", "fn_name": "get_animals_count"}, {"input": "74\n20\n34", "output": "[{\"rabbits\": 0, \"chickens\": 3, \"cows... | code_functional |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nSo many wall designs to choose from! Even modulo 106 + 3, it's an enormous number. Given that recently Heidi acquired an unlimited supply of bricks, her choices are endless! She really needs to do something to narrow them... | [{"type": "stdin_stdout", "input": "100000000 100 100\n", "output": "807624\n"}, {"type": "stdin_stdout", "input": "100000100 100 100\n", "output": "515397\n"}, {"type": "stdin_stdout", "input": "100000000 100 1\n", "output": "245069\n"}, {"type": "stdin_stdout", "input": "100000000 1 100\n", "output": "389182\n"}, {"t... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nPolycarp and Vasiliy love simple logical games. Today they play a game with infinite chessboard and one pawn for each player. Polycarp and Vasiliy move in turns, Polycarp starts. In each turn Polycarp can move his pawn fr... | [{"type": "stdin_stdout", "input": "100000 99999 100000 100000\n", "output": "Polycarp\n"}, {"type": "stdin_stdout", "input": "100000 100000 100000 99999\n", "output": "Vasiliy\n"}, {"type": "stdin_stdout", "input": "55000 60000 55003 60100\n", "output": "Polycarp\n"}, {"type": "stdin_stdout", "input": "23039 21508 541... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nTakahashi is distributing N balls to K persons.\n\nIf each person has to receive at least one ball, what is the maximum possible difference in the number of balls received between the person with the most balls and the pe... | [{"type": "stdin_stdout", "input": "-2 135", "output": "-137\n"}, {"type": "stdin_stdout", "input": "-2 240", "output": "-242\n"}, {"type": "stdin_stdout", "input": "-4 240", "output": "-244\n"}, {"type": "stdin_stdout", "input": "3 130", "output": "-127\n"}, {"type": "stdin_stdout", "input": "2 130", "output": "-128\n... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nThere is a bus route as shown in Figure 1. There are 10 stops, each numbered 0-9. The bus turns back at stop 0, but the other side is a circulation route, which circulates in the order of 5 → 6 → 7 → 8 → 9 → 5 as shown in... | [{"type": "stdin_stdout", "input": "2\n1 8\n8 0", "output": "1 2 3 4 5 6 7 8\n8 9 5 4 3 2 1 0\n"}, {"type": "stdin_stdout", "input": "2\n1 9\n8 1", "output": "1 2 3 4 5 6 7 8 9\n8 9 5 4 3 2 1\n"}, {"type": "stdin_stdout", "input": "2\n2 8\n6 2", "output": "2 3 4 5 6 7 8\n6 7 8 9 5 4 3 2\n"}, {"type": "stdin_stdout", "i... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nIn Dark Souls, players level up trading souls for stats. 8 stats are upgradable this way: vitality, attunement, endurance, strength, dexterity, resistance, intelligence, and faith. Each level corresponds to adding one poi... | [{"input": "\"pyromancer\"\n[16, 12, 11, 12, 9, 12, 13, 10]", "output": "[\"Starting as a pyromancer, level 12 will require 8348 souls.\"]", "fn_name": "souls"}, {"input": "\"pyromancer\"\n[16, 12, 11, 12, 9, 12, 13, 8]", "output": "[\"Starting as a pyromancer, level 10 will require 6672 souls.\"]", "fn_name": "souls"}... | code_functional |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nA number m of the form 10x + y is divisible by 7 if and only if x − 2y is divisible by 7. In other words, subtract twice the last digit \nfrom the number formed by the remaining digits. Continue to do this until a number ... | [{"input": "2340029794923400297949", "output": "[[14, 20]]", "fn_name": "seven"}, {"input": "170232833617690725", "output": "[[0, 16]]", "fn_name": "seven"}, {"input": "477557101", "output": "[[28, 7]]", "fn_name": "seven"}, {"input": "477557102", "output": "[[47, 7]]", "fn_name": "seven"}, {"input": "1369851", "output... | code_functional |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nLimak is a grizzly bear who desires power and adoration. He wants to win in upcoming elections and rule over the Bearland.\n\nThere are n candidates, including Limak. We know how many citizens are going to vote for each c... | [{"type": "stdin_stdout", "input": "100\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... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nproblem\n\nJOI took six subjects: physics, chemistry, biology, earth science, history, and geography. Each test was scored on a 100-point scale.\n\nJOI chooses 3 subjects from 4 subjects of physics, chemistry, biology, an... | [{"type": "stdin_stdout", "input": "100\n-3\n8\n108\n-12\n-4", "output": "212\n"}, {"type": "stdin_stdout", "input": "100\n-7\n8\n108\n-12\n-1", "output": "215\n"}, {"type": "stdin_stdout", "input": "100\n66\n-13\n-1\n-2\n2", "output": "167\n"}, {"type": "stdin_stdout", "input": "100\n106\n-5\n-1\n-2\n3", "output": "20... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nLast year the world's largest square was built in Berland. It is known that the square can be represented as an infinite plane with an introduced Cartesian system of coordinates. On that square two sets of concentric circ... | [{"type": "stdin_stdout", "input": "100000 -100000 100000 100000\n", "output": " 200001\n"}, {"type": "stdin_stdout", "input": "100000 100000 100000 -100000\n", "output": " 200001\n"}, {"type": "stdin_stdou... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nDima and Inna are doing so great! At the moment, Inna is sitting on the magic lawn playing with a pink pony. Dima wanted to play too. He brought an n × m chessboard, a very tasty candy and two numbers a and b.\n\nDima put... | [{"type": "stdin_stdout", "input": "1000000 1000000 1000000 0000000 1000000 1000000\n", "output": "Poor Inna and pony!"}, {"type": "stdin_stdout", "input": "1000100 1000000 1000000 0000000 1000000 1000000\n", "output": "Poor Inna and pony!"}, {"type": "stdin_stdout", "input": "1000100 1000010 1000000 0000000 1000000 10... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nIn the game Lizard Era: Beginning the protagonist will travel with three companions: Lynn, Meliana and Worrigan. Overall the game has n mandatory quests. To perform each of them, you need to take exactly two companions.\n... | [{"type": "stdin_stdout", "input": "25\n26668 10412 12658\n25216 11939 10247\n28514 22515 5833\n4955 19029 22405\n12552 6903 19634\n12315 1671 505\n20848 9175 6060\n12990 5827 16433\n9184 30621 25596\n31818 7826 11221\n18090 4476 30078\n30915 11014 16950\n3119 29529 21390\n775 4290 11723\n29679 14840 3566\n4491 29480 2... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nExample\n\nInput\n\nacmicpc\ntsukuba\n\n\nOutput\n\nNo\n\nThe input will be stdin and you should print your solution to stdout\n\n\nNow solve the problem and return the code.\n\nWrite Python code to solve this problem. Yo... | [{"type": "stdin_stdout", "input": "acmicpc\nttukuba", "output": "No\n"}, {"type": "stdin_stdout", "input": "acmpcic\nttukuba", "output": "No\n"}, {"type": "stdin_stdout", "input": "acmpcid\nttukuba", "output": "No\n"}, {"type": "stdin_stdout", "input": "acmpcid\nttakubu", "output": "No\n"}, {"type": "stdin_stdout", "i... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nGiven a non-negative number, return the next bigger polydivisible number, or an empty value like `null` or `Nothing`.\n\nA number is polydivisible if its first digit is cleanly divisible by `1`, its first two digits by `2... | [{"input": "3608528850368400786036724", "output": "[3608528850368400786036725]", "fn_name": "next_num"}, {"input": "3608528850368400786036725", "output": "[null]", "fn_name": "next_num"}, {"input": "1234567890", "output": "[1236004020]", "fn_name": "next_num"}, {"input": "123220", "output": "[123252]", "fn_name": "next... | code_functional |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nFind the sum of the integers between 1 and N (inclusive), whose sum of digits written in base 10 is between A and B (inclusive).\n\n-----Constraints-----\n - 1 \\leq N \\leq 10^4\n - 1 \\leq A \\leq B \\leq 36\n - All inp... | [{"type": "stdin_stdout", "input": "100 4 16\n", "output": "4554\n"}, {"type": "stdin_stdout", "input": "101 0 154", "output": "5151\n"}, {"type": "stdin_stdout", "input": "111 1 181", "output": "6216\n"}, {"type": "stdin_stdout", "input": "110 2 100", "output": "5994\n"}, {"type": "stdin_stdout", "input": "100 2 100",... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nSlava plays his favorite game \"Peace Lightning\". Now he is flying a bomber on a very specific map.\n\nFormally, map is a checkered field of size 1 × n, the cells of which are numbered from 1 to n, in each cell there can... | [{"type": "stdin_stdout", "input": "11124\n", "output": "16686\n2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 60 62 64 66 68 70 72 74 76 78 80 82 84 86 88 90 92 94 96 98 100 102 104 106 108 110 112 114 116 118 120 122 124 126 128 130 132 134 136 138 140 142 144 146 148 150 152 154 1... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nWe have a graph with N vertices, numbered 0 through N-1. Edges are yet to be added.\n\nWe will process Q queries to add edges. In the i-th (1≦i≦Q) query, three integers A_i, B_i and C_i will be given, and we will add infi... | [{"type": "stdin_stdout", "input": "2 1\n0 0 1000000010", "output": "1000000011\n"}, {"type": "stdin_stdout", "input": "2 1\n1 0 1000000010", "output": "1000000010\n"}, {"type": "stdin_stdout", "input": "2 1\n0 0 1000000100", "output": "1000000101\n"}, {"type": "stdin_stdout", "input": "2 1\n0 0 1000001010", "output": ... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nOne tradition of ACM-ICPC contests is that a team gets a balloon for every solved problem. We assume that the submission time doesn't matter and teams are sorted only by the number of balloons they have. It means that one... | [{"type": "stdin_stdout", "input": "7\n14000000003 1000000000000000000\n81000000000 88000000000\n5000000000 10778591928\n15000000000 39000000000\n46000000000 51000000000\n0 0000000000\n0 0\n", "output": "3\n"}, {"type": "stdin_stdout", "input": "7\n14000000003 1000000000000000000\n81000000000 88000000000\n5000000000 10... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nPeter loves any kinds of cheating. A week before ICPC, he broke into Doctor's PC and sneaked a look at all the problems that would be given in ICPC. He solved the problems, printed programs out, and brought into ICPC. Sin... | [{"type": "stdin_stdout", "input": "3\n10 20 47\n7\n56 26 62 143 38 80 7", "output": "117\n1108\n"}, {"type": "stdin_stdout", "input": "3\n10 20 47\n7\n56 44 62 143 38 80 7", "output": "117\n1210\n"}, {"type": "stdin_stdout", "input": "3\n10 20 47\n7\n56 44 62 143 38 80 6", "output": "117\n1203\n"}, {"type": "stdin_std... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nPalindromic characteristics of string s with length |s| is a sequence of |s| integers, where k-th number is the total number of non-empty substrings of s which are k-palindromes.\n\nA string is 1-palindrome if and only if... | [{"type": "stdin_stdout", "input": "wyemcafatp\n", "output": "11 1 0 0 0 0 0 0 0 0 \n"}, {"type": "stdin_stdout", "input": "wyemcafatp\n", "output": "11 1 0 0 0 0 0 0 0 0 "}, {"type": "stdin_stdout", "input": "wyempafatc\n", "output": "11 1 0 0 0 0 0 0 0 0\n"}, {"type": "stdin_stdout", "input": "wyempaf`tc\n", "output"... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nOf course our child likes walking in a zoo. The zoo has n areas, that are numbered from 1 to n. The i-th area contains ai animals in it. Also there are m roads in the zoo, and each road connects two distinct areas. Natura... | [{"type": "stdin_stdout", "input": "10 19\n13637 26970 19043 3616 12880 19387 12539 25190 2452 1261\n1 2\n1 3\n1 4\n2 5\n3 6\n6 7\n3 8\n5 9\n3 10\n4 10\n9 3\n2 8\n4 3\n2 3\n7 10\n7 8\n5 10\n5 6\n7 4\n", "output": "8241.4222222222\n"}, {"type": "stdin_stdout", "input": "10 19\n15704 19758 26631 25050 22778 15041 8487 26... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nMonocarp plays a computer game. There are $n$ different sets of armor and $m$ different weapons in this game. If a character equips the $i$-th set of armor and wields the $j$-th weapon, their power is usually equal to $i ... | [{"type": "stdin_stdout", "input": "2 10\n20\n2 2\n2 3\n2 4\n1 5\n1 2\n1 6\n1 1\n1 10\n2 10\n1 4\n2 8\n2 1\n1 9\n1 8\n2 5\n1 7\n2 7\n1 3\n2 9\n2 6\n", "output": "4\n"}, {"type": "stdin_stdout", "input": "2 10\n20\n2 6\n2 3\n1 1\n2 1\n2 9\n1 6\n1 2\n1 9\n1 10\n2 7\n2 4\n2 5\n1 5\n2 2\n2 8\n1 3\n1 8\n1 4\n1 7\n2 10\n", "... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nCreate a function `longer` that accepts a string and sorts the words in it based on their respective lengths in an ascending order. If there are two words of the same lengths, sort them alphabetically. Look at the example... | [{"input": "\"Darkness on the edge of Town\"", "output": "[\"of on the Town edge Darkness\"]", "fn_name": "longer"}, {"input": "\"Have you ever Seen the Rain\"", "output": "[\"the you Have Rain Seen ever\"]", "fn_name": "longer"}, {"input": "\"This will be our Year\"", "output": "[\"be our This Year will\"]", "fn_name"... | code_functional |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nWe have an integer array with unique elements and we want to do the permutations that have an element fixed, in other words, these permutations should have a certain element at the same position than the original.\n\nThes... | [{"input": "20\n2", "output": "[447507315596451070]", "fn_name": "fixed_points_perms"}, {"input": "10\n3", "output": "[222480]", "fn_name": "fixed_points_perms"}, {"input": "10\n4", "output": "[55650]", "fn_name": "fixed_points_perms"}, {"input": "4\n1", "output": "[8]", "fn_name": "fixed_points_perms"}, {"input": "4\n... | code_functional |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nYou are given a rectangular table 3 × n. Each cell contains an integer. You can move from one cell to another if they share a side.\n\nFind such path from the upper left cell to the bottom right cell of the table that doe... | [{"type": "stdin_stdout", "input": "10\n1086100980 -928074266 -409520915 770775361 240764400 108297300 -280070452 588179696 -920283246 736937716\n422602209 -940948979 -483879926 -525886137 -79749893 -958247281 844561102 553768085 269384580 -975129348\n-485518332 -130037110 493465239 494308146 958976404 706037260 154106... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nIn the snake exhibition, there are $n$ rooms (numbered $0$ to $n - 1$) arranged in a circle, with a snake in each room. The rooms are connected by $n$ conveyor belts, and the $i$-th conveyor belt connects the rooms $i$ an... | [{"type": "stdin_stdout", "input": "36\n2\n--\n2\n>-\n2\n<-\n2\n->\n2\n>>\n2\n<>\n2\n-<\n2\n><\n2\n<<\n3\n---\n3\n>--\n3\n<--\n3\n->-\n3\n>>-\n3\n<>-\n3\n-<-\n3\n><-\n3\n<<-\n3\n-->\n3\n>->\n3\n<->\n3\n->>\n3\n>>>\n3\n<>>\n3\n-<>\n3\n><>\n3\n<<>\n3\n--<\n3\n>-<\n3\n<-<\n3\n-><\n3\n>><\n3\n<><\n3\n-<<\n3\n><<\n3\n<<<\n"... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nWrite a function that reverses the bits in an integer.\n\nFor example, the number `417` is `110100001` in binary. Reversing the binary is `100001011` which is `267`.\n\nYou can assume that the number is not negative.\n\nW... | [{"input": "2017", "output": "[1087]", "fn_name": "reverse_bits"}, {"input": "1023", "output": "[1023]", "fn_name": "reverse_bits"}, {"input": "417", "output": "[267]", "fn_name": "reverse_bits"}, {"input": "267", "output": "[417]", "fn_name": "reverse_bits"}, {"input": "1024", "output": "[1]", "fn_name": "reverse_bits... | code_functional |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nIn this kata you need to write a function that will receive two strings (```n1``` and ```n2```), each representing an integer as a binary number. A third parameter will be provided (```o```) as a string representing one o... | [{"input": "\"10\"\n\"10\"\n\"multiply\"", "output": "[\"100\"]", "fn_name": "calculate"}, {"input": "\"100\"\n\"10\"\n\"subtract\"", "output": "[\"10\"]", "fn_name": "calculate"}, {"input": "\"1\"\n\"1\"\n\"subtract\"", "output": "[\"0\"]", "fn_name": "calculate"}, {"input": "\"1\"\n\"1\"\n\"multiply\"", "output": "[\... | code_functional |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nRecently Polycarp noticed that some of the buttons of his keyboard are malfunctioning. For simplicity, we assume that Polycarp's keyboard contains $26$ buttons (one for each letter of the Latin alphabet). Each button is e... | [{"type": "stdin_stdout", "input": "1\nammsdsdadasdsadssadassadsadasdsadsadr\n", "output": "adrs\n"}, {"type": "stdin_stdout", "input": "1\nammsdsdadasdsadssadassadsadasdsadsadr\n", "output": "adrs\n"}, {"type": "stdin_stdout", "input": "1\nammsdsdaeasdsadssadassadsadasdsadsads\n", "output": "ades\n"}, {"type": "stdin_... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nArkady is playing Battleship. The rules of this game aren't really important.\n\nThere is a field of $n \\times n$ cells. There should be exactly one $k$-decker on the field, i. e. a ship that is $k$ cells long oriented e... | [{"type": "stdin_stdout", "input": "19 6\n##..............###\n#......#####.....##\n.....#########.....\n....###########....\n...#############...\n..###############..\n.#################.\n.#################.\n.#################.\n.#################.\n#####....##....####\n####............###\n###............####\n#####... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nLittle Chris knows there's no fun in playing dominoes, he thinks it's too random and doesn't require skill. Instead, he decided to play with the dominoes and make a \"domino show\".\n\nChris arranges n dominoes in a line,... | [{"type": "stdin_stdout", "input": "400\n.L.R.LR.LRL.R.LR.LR..L....RLR.L..R..LRLRLR.LRL..RLR.LRLRLRLR.LR..LRL.RLR...LRLR.LRL.R.LR..LR.LRLR...LRLRL.R.L.....RL..RL.RLRL.RL.RL...RL..R.LRLRL..R.LRL...R..LRL.RLRL...RL..RLRLRLRL.R..LRL.R..LRLRL.R.L.R.L.RL.RLRLRL....R.LR..L..RL.RL.RLRLR.L..RLRL.RLR..LRLR.L.R..L.R.LR.LRL.....R... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nThere is always an integer in Takahashi's mind.\nInitially, the integer in Takahashi's mind is 0. Takahashi is now going to eat four symbols, each of which is + or -. When he eats +, the integer in his mind increases by 1... | [{"type": "stdin_stdout", "input": "-+--\n", "output": "-2\n"}, {"type": "stdin_stdout", "input": "----\n", "output": "-4\n"}, {"type": "stdin_stdout", "input": "--+-\n", "output": "-2\n"}, {"type": "stdin_stdout", "input": "+---\n", "output": "-2\n"}, {"type": "stdin_stdout", "input": "+-++\n", "output": "2\n"}, {"typ... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\n# Description\n\nGiven a number `n`, you should find a set of numbers for which the sum equals `n`. This set must consist exclusively of values that are a power of `2` (eg: `2^0 => 1, 2^1 => 2, 2^2 => 4, ...`).\n\nThe fun... | [{"input": "9007199254740991", "output": "[[1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, 16777216, 33554432, 67108864, 134217728, 268435456, 536870912, 1073741824, 2147483648, 4294967296, 8589934592, 17179869184, 34359738... | code_functional |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nRead problems statements in Mandarin Chinese, Russian and Vietnamese as well. \n\nChef's team is going to participate at the legendary math battles. One of the main task in the competition is to calculate the number of wa... | [{"type": "stdin_stdout", "input": "5\n-2 -8\n11 0\n109 35\n0 -2\n-4 0", "output": "0\n0\n4375\n0\n0\n"}, {"type": "stdin_stdout", "input": "5\n-3 0\n11 1\n148 35\n0 -2\n-4 0", "output": "0\n0\n18334\n0\n0\n"}, {"type": "stdin_stdout", "input": "5\n-3 0\n5 1\n148 35\n0 -2\n-4 0", "output": "0\n1\n18334\n0\n0\n"}, {"typ... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nTake debugging to a whole new level:\n\nGiven a string, remove every *single* bug.\n\nThis means you must remove all instances of the word 'bug' from within a given string, *unless* the word is plural ('bugs').\n\nFor exa... | [{"input": "\"oaisjdfowjefpoibugsjsofijeo oi bugs o bug f bug poaj sfd s\"", "output": "[\"oaisjdfowjefpoibugsjsofijeo oi bugs o f poaj sfd s\"]", "fn_name": "debug"}, {"input": "\"oaiwjefbugoijoijapsbugsdoibugbugjfoijasdfbugsbug\"", "output": "[\"oaiwjefoijoijapsbugsdoijfoijasdfbugs\"]", "fn_name": "debug"}, {"input... | code_functional |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nPavel made a photo of his favourite stars in the sky. His camera takes a photo of all points of the sky that belong to some rectangle with sides parallel to the coordinate axes.\n\nStrictly speaking, it makes a photo of a... | [{"type": "stdin_stdout", "input": "2\n240945287 28477772 1496174734 106174079\n", "output": "97526692469552229\n"}, {"type": "stdin_stdout", "input": "2\n240945287 28477772 1496174734 174902664\n", "output": "96930557139611326\n"}, {"type": "stdin_stdout", "input": "2\n240945287 45763153 1496174734 174902664\n", "outp... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nKevin Sun has just finished competing in Codeforces Round #334! The round was 120 minutes long and featured five problems with maximum point values of 500, 1000, 1500, 2000, and 2500, respectively. Despite the challenging... | [{"type": "stdin_stdout", "input": "119 119 119 119 119\n10 10 10 10 10\n0 20\n", "output": "1310\n"}, {"type": "stdin_stdout", "input": "119 119 119 119 119\n10 10 10 10 10\n0 20\n", "output": "1310\n"}, {"type": "stdin_stdout", "input": "78 119 119 119 119\n10 10 10 10 10\n0 20\n", "output": "1310\n"}, {"type": "stdi... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nFor given integer n, count the totatives of n, that is, the positive integers less than or equal to n that are relatively prime to n.\n\n\n\nInput\n\n\nn\n\n\nAn integer n (1 ≤ n ≤ 1000000000).\n\nOutput\n\nThe number of ... | [{"type": "stdin_stdout", "input": "1101011", "output": "1084512\n"}, {"type": "stdin_stdout", "input": "1100111", "output": "1097712\n"}, {"type": "stdin_stdout", "input": "1010111", "output": "1003752\n"}, {"type": "stdin_stdout", "input": "1111111", "output": "1106224\n"}, {"type": "stdin_stdout", "input": "1011001"... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nConsider the following array:\n\n```\n[1, 12, 123, 1234, 12345, 123456, 1234567, 12345678, 123456789, 12345678910, 1234567891011...]\n```\n\nIf we join these blocks of numbers, we come up with an infinite sequence which s... | [{"input": "1000000000000000000", "output": "[1]", "fn_name": "solve"}, {"input": "999999999999999999", "output": "[4]", "fn_name": "solve"}, {"input": "999999999999999993", "output": "[7]", "fn_name": "solve"}, {"input": "123456789", "output": "[3]", "fn_name": "solve"}, {"input": "123456", "output": "[6]", "fn_name":... | code_functional |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nYour wizard cousin works at a Quidditch stadium and wants you to write a function that calculates the points for the Quidditch scoreboard! \n\n# Story\n\nQuidditch is a sport with two teams. The teams score goals by throw... | [{"input": "\"Caerphilly Catapults vs Wigtown Wanderers\"\n\"Caerphilly Catapults: Quaffle goal, Caerphilly Catapults: Quaffle goal, Caerphilly Catapults: Quaffle goal, Caerphilly Catapults: Quaffle goal, Caerphilly Catapults: Quaffle goal, Caerphilly Catapults: Quaffle goal, Wigtown Wanderers: Quaffle goal, Caerphilly... | code_functional |
[
{
"content": "Solve the following coding problem using the programming language python:\n\n3R2 as DJ Mashiro - Happiness Breeze Ice - DJ Mashiro is dead or alive\n\nNEKO#ΦωΦ has just got a new maze game on her PC!\n\nThe game's main puzzle is a maze, in the forms of a $2 \\times n$ rectangle grid. NEKO's task i... | [{"type": "stdin_stdout", "input": "10 83\n1 3\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n1 4\n2 2\n2 3\n2 3\n2 3\n2 3\n2 3\n2 3\n1 4\n1 5\n1 7\n2 2\n2 2\n1 5\n2 2\n1 3\n2 1\n2 6\n1 5\n2 6\n2 9\n1 2\n2 5\n1 2\n2 5\n2 4\n2 4\n1 2\n1 2\n1 4\n2 6\n2 6\n2 4\n2 4\n1 2\n1 2\n2 4\n2 4\n2 3\n2 3\n1 2\n2 9\n1 2\n1 2\n1 2\n2 6\n2 6\n2 ... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nThere is a legend in the IT City college. A student that failed to answer all questions on the game theory exam is given one more chance by his professor. The student has to play a game with the professor.\n\nThe game is ... | [{"type": "stdin_stdout", "input": "1250846005844530517\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "1000001000000000000\n", "output": "2\n"}, {"type": "stdin_stdout", "input": "2039244416399039339\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "1000001000000001000\n", "output": "2\n"}, {"type": "s... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nImplement a function which behaves like the uniq command in UNIX.\n\nIt takes as input a sequence and returns a sequence in which all duplicate elements following each other have been reduced to one instance.\n\nExample:\... | [{"input": "[\"a\", \"a\", \"b\", \"b\", \"c\", \"a\", \"b\", \"c\", \"c\"]", "output": "[[\"a\", \"b\", \"c\", \"a\", \"b\", \"c\"]]", "fn_name": "uniq"}, {"input": "[\"a\", \"a\", \"a\", \"b\", \"b\", \"b\", \"c\", \"c\", \"c\"]", "output": "[[\"a\", \"b\", \"c\"]]", "fn_name": "uniq"}, {"input": "[null, \"a\", \"a\"... | code_functional |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nWet Shark once had 2 sequences: \n{a_n}= {a_1, a_2, a_3, ... , a_(109)} \n{b_n} = {b_1, b_2, b_3, ... , b_(109)} \nHowever, he only kept one element from each sequence. Luckily, both the elements that Wet Shark kept hav... | [{"type": "stdin_stdout", "input": "-15 -1 -2\n2 0", "output": "2147483648.00000000000\n"}, {"type": "stdin_stdout", "input": "-15 -1 -1\n2 0", "output": "1073741824.00000000000\n"}, {"type": "stdin_stdout", "input": "-6 4 -1\n8 -1", "output": "14680064.00000000000\n"}, {"type": "stdin_stdout", "input": "-8 0 -1\n2 -1"... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nWhen preparing a tournament, Codeforces coordinators try treir best to make the first problem as easy as possible. This time the coordinator had chosen some problem and asked $n$ people about their opinions. Each person a... | [{"type": "stdin_stdout", "input": "100\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 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\n", "output": "EASY\n"}, {"type": "stdin_stdout", "input": "100\n0 0 0 0 0 0 0 ... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\n## Task:\n\nYour task is to write a function which returns the sum of following series upto nth term(parameter).\n\n Series: 1 + 1/4 + 1/7 + 1/10 + 1/13 + 1/16 +...\n \n## Rules:\n \n* You need to round the answer to 2... | [{"input": "15", "output": "[\"1.94\"]", "fn_name": "series_sum"}, {"input": "39", "output": "[\"2.26\"]", "fn_name": "series_sum"}, {"input": "58", "output": "[\"2.40\"]", "fn_name": "series_sum"}, {"input": "1", "output": "[\"1.00\"]", "fn_name": "series_sum"}, {"input": "2", "output": "[\"1.25\"]", "fn_name": "serie... | code_functional |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nCountry of Metropolia is holding Olympiad of Metrpolises soon. It mean that all jury members of the olympiad should meet together in Metropolis (the capital of the country) for the problem preparation process.\n\nThere ar... | [{"type": "stdin_stdout", "input": "10 10 1\n351 0 3 7\n214 0 9 9\n606 0 7 8\n688 0 9 3\n188 3 0 9\n994 0 1 7\n372 5 0 14\n957 0 3 6\n458 8 0 7\n379 0 4 7\n", "output": "-1\n"}, {"type": "stdin_stdout", "input": "4 10 1\n988 0 1 1\n507 1 0 9\n798 1 0 9\n400 0 3 7\n242 2 0 8\n574 4 0 7\n458 0 4 9\n330 0 2 9\n303 2 0 8\n... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nThe only difference between the easy and hard versions is that tokens of type O do not appear in the input of the easy version.\n\nErrichto gave Monogon the following challenge in order to intimidate him from taking his t... | [{"type": "stdin_stdout", "input": "3\n3\n.X.\nXXX\n.X.\n6\nXX.XXX\nXXXXXX\nXXX.XX\nXXXXXX\nXX.X.X\nXXXXXX\n5\nXXX.X\n.X..X\nXXX.X\n..X..\n..X..\n", "output": "\n.X.\nXOX\n.X.\nXX.XXO\nXOXXOX\nOXX.XX\nXOOXXO\nXX.X.X\nOXXOXX\nXOX.X\n.X..X\nXXO.O\n..X..\n..X..\n"}, {"type": "stdin_stdout", "input": "3\n3\n.X.\nXXX\n.X.\n... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nFloating-Point Numbers\n\nIn this problem, we consider floating-point number formats, data representation formats to approximate real numbers on computers.\n\nScientific notation is a method to express a number, frequentl... | [{"type": "stdin_stdout", "input": "1\n0000000000100000000000000000000000000000000000000000\n2\n0000000000000000000000000000000000000000000000000000\n2\n0000000000000000001000000000000000000000000000000000\n11\n0000000000000000000000000000000000000000000000000000\n7\n1101000000000000000000000000000000000000000000000000... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\n**This Kata is intended as a small challenge for my students**\n\nAll Star Code Challenge #16\n\nCreate a function called noRepeat() that takes a string argument and returns a single letter string of the **first** not rep... | [{"input": "\"aabbccdde\"", "output": "[\"e\"]", "fn_name": "no_repeat"}, {"input": "\"codewars\"", "output": "[\"c\"]", "fn_name": "no_repeat"}, {"input": "\"testing\"", "output": "[\"e\"]", "fn_name": "no_repeat"}, {"input": "\"Testing\"", "output": "[\"T\"]", "fn_name": "no_repeat"}, {"input": "\"wxyz\"", "output": ... | code_functional |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nGiven an array of integers, return the smallest common factors of all integers in the array.\n\nWhen i say **Smallest Common Factor** i mean the smallest number above 1 that can divide all numbers in the array without a r... | [{"input": "[200, 30, 18, 8, 64, 34]", "output": "[2]", "fn_name": "scf"}, {"input": "[21, 45, 51, 27, 33]", "output": "[3]", "fn_name": "scf"}, {"input": "[133, 147, 427, 266]", "output": "[7]", "fn_name": "scf"}, {"input": "[3, 5, 7]", "output": "[1]", "fn_name": "scf"}, {"input": "[]", "output": "[1]", "fn_name": "s... | code_functional |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nWrite a program which manipulates a weighted rooted tree $T$ with the following operations:\n\n* $add(v,w)$: add $w$ to all edges from the root to node $u$\n\n* $getSum(u)$: report the sum of weights of all edges from the... | [{"type": "stdin_stdout", "input": "6\n2 1 2\n2 3 5\n0\n0\n0\n1 4\n7\n1 1\n0 3 12\n1 2\n0 4 20\n1 3\n0 3 40\n1 4", "output": "0\n0\n44\n112\n"}, {"type": "stdin_stdout", "input": "6\n2 1 2\n2 3 5\n0\n0\n0\n1 4\n7\n1 1\n0 3 6\n1 2\n0 4 20\n1 3\n0 5 40\n1 4", "output": "0\n0\n32\n146\n"}, {"type": "stdin_stdout", "input"... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nVasya adores sport programming. He can't write programs but he loves to watch the contests' progress. Vasya even has a favorite coder and Vasya pays special attention to him.\n\nOne day Vasya decided to collect the result... | [{"type": "stdin_stdout", "input": "100\n9999 9999 9999 9998 9998 9998 9997 9996 9996 9995 9993 9993 9991 9990 9989 9986 9984 9984 9983 9981 9981 10079 9980 9980 9979 9977 9977 9977 9977 9977 9976 9976 9975 9975 9973 9972 9972 9972 9972 9971 9969 9969 9969 9968 9967 9965 9962 9962 9962 9962 9960 9958 9958 9955 9954 995... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nIt is known that the area of a regular dodecagon inscribed in a circle of radius a is 3a^2.\nGiven an integer r, find the area of a regular dodecagon inscribed in a circle of radius r.\n\n-----Constraints-----\n - 1 \\leq... | [{"type": "stdin_stdout", "input": "100\n", "output": "30000\n"}, {"type": "stdin_stdout", "input": "270", "output": "218700\n"}, {"type": "stdin_stdout", "input": "256", "output": "196608\n"}, {"type": "stdin_stdout", "input": "203", "output": "123627\n"}, {"type": "stdin_stdout", "input": "196", "output": "115248\n"}... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nBerland has a long and glorious history. To increase awareness about it among younger citizens, King of Berland decided to compose an anthem.\n\nThough there are lots and lots of victories in history of Berland, there is ... | [{"type": "stdin_stdout", "input": "????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\n## The galactic games have begun!\n\nIt's the galactic games! Beings of all worlds come together to compete in several interesting sports, like nroogring, fredling and buzzing (the beefolks love the last one). However, th... | [{"input": "50000000000000000000000000000000000000000", "output": "[583333333333333333333333333333333333333291666666666666666666666666666666666666668]", "fn_name": "solution"}, {"input": "50000000", "output": "[583333291666668]", "fn_name": "solution"}, {"input": "1000000", "output": "[233333166668]", "fn_name": "solut... | code_functional |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nIn olden days finding square roots seemed to be difficult but nowadays it can be easily done using in-built functions available across many languages \n.\n\nAssume that you happen to hear the above words and you want to g... | [{"type": "stdin_stdout", "input": "3\n18\n10\n10000", "output": "4\n3\n100\n"}, {"type": "stdin_stdout", "input": "3\n17\n16\n10010", "output": "4\n4\n100\n"}, {"type": "stdin_stdout", "input": "3\n10\n5\n10010", "output": "3\n2\n100\n"}, {"type": "stdin_stdout", "input": "3\n1\n11\n10000", "output": "1\n3\n100\n"}, {... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nSome time ago Mister B detected a strange signal from the space, which he started to study.\n\nAfter some transformation the signal turned out to be a permutation p of length n or its cyclic shift. For the further investi... | [{"type": "stdin_stdout", "input": "108\n1 102 33 99 6 83 4 20 61 100 76 71 44 9 24 87 57 2 81 82 90 85 12 30 66 53 47 36 43 29 31 64 96 84 77 23 93 78 58 68 42 55 13 70 62 19 92 14 10 65 63 75 91 48 11 105 37 50 32 94 18 26 52 89 104 106 86 97 80 95 17 72 40 22 79 103 25 101 35 51 15 98 67 5 34 69 54 27 45 88 56 16 46... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nWe have two distinct integers A and B.\nPrint the integer K such that |A - K| = |B - K|.\nIf such an integer does not exist, print IMPOSSIBLE instead.\n\n-----Constraints-----\n - All values in input are integers.\n - 0 \... | [{"type": "stdin_stdout", "input": "999999999 1000000000\n", "output": "IMPOSSIBLE\n"}, {"type": "stdin_stdout", "input": "369673908 845644227\n", "output": "IMPOSSIBLE\n"}, {"type": "stdin_stdout", "input": "232334010 962483782\n", "output": "597408896\n"}, {"type": "stdin_stdout", "input": "274100628 29096111\n", "ou... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nOf the real numbers, those with a circular decimal part and those with a finite number of digits can be expressed as fractions.\n\n\n\n\nGiven a real number that can be represented by a fraction, write a program that outp... | [{"type": "stdin_stdout", "input": "3.2(145)", "output": "32113/9990\n"}, {"type": "stdin_stdout", "input": "3.3(145)", "output": "16556/4995\n"}, {"type": "stdin_stdout", "input": "5.21(43)", "output": "25811/4950\n"}, {"type": "stdin_stdout", "input": "3.3(155)", "output": "16561/4995\n"}, {"type": "stdin_stdout", "i... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nVasiliy is fond of solving different tasks. Today he found one he wasn't able to solve himself, so he asks you to help.\n\nVasiliy is given n strings consisting of lowercase English letters. He wants them to be sorted in ... | [{"type": "stdin_stdout", "input": "10\n1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000\naaaaaaaaaaab\nab\naab\naaab\naaaab\naaaaab\naaaaaab\naaaaaaab\naaaaaaaab\naaaaaaaaab\n", "output": "8000000000\n"}, {"type": "stdin_stdout", "input": "10\n1000000000 100... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nYou are given $n$ one-dimensional segments (each segment is denoted by two integers — its endpoints).\n\nLet's define the function $f(x)$ as the number of segments covering point $x$ (a segment covers the point $x$ if $l ... | [{"type": "stdin_stdout", "input": "9\n4 3\n1 3\n7 9\n2 5\n3 6\n2 9\n1 4\n3 7\n1 3\n2 4\n3 5\n1 4\n6 7\n5 5\n4 3\n1 3\n7 9\n2 5\n3 6\n2 9\n1 4\n3 7\n1 3\n2 4\n3 5\n1 4\n6 7\n5 5\n1 4\n3 7\n", "output": "YES\nNO\nNO\nYES\nYES\nNO\nNO\nYES\nNO\n"}, {"type": "stdin_stdout", "input": "4\n4 3\n1 3\n7 9\n2 5\n3 6\n2 9\n1 4\n... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nThe restaurant AtCoder serves the following five dishes:\n - ABC Don (rice bowl): takes A minutes to serve.\n - ARC Curry: takes B minutes to serve.\n - AGC Pasta: takes C minutes to serve.\n - APC Ramen: takes D minutes ... | [{"type": "stdin_stdout", "input": "123\n123\n123\n123\n123\n", "output": "643\n"}, {"type": "stdin_stdout", "input": "123\n123\n161\n123\n123", "output": "681\n"}, {"type": "stdin_stdout", "input": "123\n123\n161\n123\n163", "output": "721\n"}, {"type": "stdin_stdout", "input": "123\n123\n161\n123\n263", "output": "82... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nXenia is a girl being born a noble. Due to the inflexibility and harshness of her family, Xenia has to find some ways to amuse herself.\n\nRecently Xenia has bought $n_r$ red gems, $n_g$ green gems and $n_b$ blue gems. Ea... | [{"type": "stdin_stdout", "input": "1\n10 10 10\n761 829 1037 1818 133 576 705 131 935 821\n896 163 569 957 169 475 342 1074 760 434\n131 383 243 247 908 799 56 1929 360 189\n", "output": "1928\n"}, {"type": "stdin_stdout", "input": "1\n10 10 10\n761 829 1037 1818 133 576 705 131 935 821\n896 163 569 656 169 475 342 10... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nHideo Kojima has just quit his job at Konami. Now he is going to find a new place to work. Despite being such a well-known person, he still needs a CV to apply for a job.\n\nDuring all his career Hideo has produced n game... | [{"type": "stdin_stdout", "input": "100\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 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\n", "output": "100\n"}, {"type": "stdin_stdout", "input": "100\n1 1 1 1 1 1 1 1... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nYou want to make change for $ n $ cents. Assuming that you have infinite supply of coins of 1, 5, 10 and / or 25 cents coins respectively, find the minimum number of coins you need.\n\nConstraints\n\n* $ 1 \\ le n \\ le 1... | [{"type": "stdin_stdout", "input": "251195", "output": "10049\n"}, {"type": "stdin_stdout", "input": "467454", "output": "18702\n"}, {"type": "stdin_stdout", "input": "698278", "output": "27934\n"}, {"type": "stdin_stdout", "input": "323456", "output": "12940\n"}, {"type": "stdin_stdout", "input": "164898", "output": "... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nThis year in Equestria was a year of plenty, so Applejack has decided to build some new apple storages. According to the advice of the farm designers, she chose to build two storages with non-zero area: one in the shape o... | [{"type": "stdin_stdout", "input": "1\n1\n34\n- 1\n+ 1\n+ 1\n+ 1\n+ 1\n+ 1\n+ 1\n+ 1\n+ 1\n+ 1\n- 1\n- 1\n- 1\n- 1\n- 1\n+ 2\n+ 2\n+ 2\n+ 2\n- 1\n+ 2\n+ 2\n- 1\n+ 2\n- 1\n+ 3\n+ 3\n+ 1\n- 1\n- 2\n- 2\n- 2\n+ 1\n+ 3\n", "output": "NO\nNO\nNO\nNO\nNO\nNO\nNO\nNO\nYES\nYES\nYES\nNO\nNO\nNO\nNO\nNO\nNO\nNO\nYES\nNO\nNO\nYE... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nA permutation of length $n$ is an array consisting of $n$ distinct integers from $1$ to $n$ in arbitrary order. For example, $[2,3,1,5,4]$ is a permutation, but $[1,2,2]$ is not a permutation ($2$ appears twice in the arr... | [{"type": "stdin_stdout", "input": "100\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n2\n13\n14\n23\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n35\n36\n90\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n69\n50\n51\n52\n53\n80\n55\n56\n57\n58\n59\n51\n61\n62\n103\n64\n65\n66\n67\n68\n69\n72\n71\n72\n... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nRead problems statements in Mandarin Chinese, Russian and Vietnamese as well. \n\nYou are given two integer arrays A and B each of size N. Let us define interaction of arrays A and B to be the sum of A[i] * B[i] for each ... | [{"type": "stdin_stdout", "input": "2\n2 2\n2 2\n-4 6\n3 9\n1 2 -3\n-2 -1 -4", "output": "16\n44\n"}, {"type": "stdin_stdout", "input": "2\n2 4\n0 2\n-1 10\n3 3\n1 2 -3\n-4 3 -5", "output": "60\n32\n"}, {"type": "stdin_stdout", "input": "2\n2 4\n0 2\n-1 10\n3 1\n1 2 -3\n-4 3 -5", "output": "60\n22\n"}, {"type": "stdin_... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nYour friend is developing a computer game. He has already decided how the game world should look like — it should consist of n locations connected by m two-way passages. The passages are designed in such a way that it sho... | [{"type": "stdin_stdout", "input": "50 72\n35 38\n19 46\n35 12\n27 30\n23 41\n50 16\n31 6\n20 33\n38 1\n10 35\n13 43\n29 25\n25 4\n1 13\n4 20\n36 29\n13 47\n48 5\n30 21\n30 38\n28 50\n41 45\n25 43\n40 36\n19 47\n31 32\n26 28\n8 13\n43 24\n27 35\n14 29\n14 38\n50 9\n34 49\n12 34\n43 42\n41 15\n46 29\n48 11\n48 7\n40 29\... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nThe town sheriff dislikes odd numbers and wants all odd numbered families out of town! In town crowds can form and individuals are often mixed with other people and families. However you can distinguish the family they be... | [{"input": "[82, 86, 71, 58, 44, 79, 50, 44, 79, 67, 82, 82, 55, 50]", "output": "[[44, 79, 50, 44, 79, 50]]", "fn_name": "odd_ones_out"}, {"input": "[100, 100, 5, 5, 100, 50, 68, 50, 68, 50, 68, 5, 100]", "output": "[[100, 100, 100, 100]]", "fn_name": "odd_ones_out"}, {"input": "[42, 72, 32, 4, 94, 82, 67, 67]", "outp... | code_functional |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nSometimes Mister B has free evenings when he doesn't know what to do. Fortunately, Mister B found a new game, where the player can play against aliens.\n\nAll characters in this game are lowercase English letters. There a... | [{"type": "stdin_stdout", "input": "12 12 876543210 1000000000\n", "output": "13\n"}, {"type": "stdin_stdout", "input": "12 12 876543210 1000000000\n", "output": "13"}, {"type": "stdin_stdout", "input": "10 12 220000011 220000032\n", "output": "11\n"}, {"type": "stdin_stdout", "input": "5 10 1000000000 1000000000\n", "... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\n<image>\n\n\nThere used to be a game called Joseph's potatoes. Let's say n people are participating. Participants form a circle facing the center and are numbered starting from 1. One hot potato is given to participant n ... | [{"type": "stdin_stdout", "input": "44 3\n45 10\n0 0", "output": "40\n33\n"}, {"type": "stdin_stdout", "input": "75 2\n16 14\n0 0", "output": "23\n10\n"}, {"type": "stdin_stdout", "input": "18 3\n45 10\n0 0", "output": "14\n33\n"}, {"type": "stdin_stdout", "input": "26 3\n45 10\n0 0", "output": "17\n33\n"}, {"type": "s... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nThere is a straight snowy road, divided into n blocks. The blocks are numbered from 1 to n from left to right. If one moves from the i-th block to the (i + 1)-th block, he will leave a right footprint on the i-th block. S... | [{"type": "stdin_stdout", "input": "17\n.......RRRRR.....\n", "output": "8 13\n"}, {"type": "stdin_stdout", "input": "17\n.....RRRRR.......\n", "output": "6 11\n"}, {"type": "stdin_stdout", "input": "17\n......RRRRR......\n", "output": "7 12\n"}, {"type": "stdin_stdout", "input": "13\n....LLLLLL...\n", "output": "10 4\... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nYou have a new professor of graph theory and he speaks very quickly. You come up with the following plan to keep up with his lecture and make notes.\n\nYou know two languages, and the professor is giving the lecture in th... | [{"type": "stdin_stdout", "input": "10 22\nazbrll oen\ngh vdyayei\njphveblohx vfglv\nmfyxib jepnvhcuwo\nrpikazqj uam\nl rx\nokjenof qpnyi\nj tixqrno\nod itozmfct\nikkdxmirx ev\nqexftojc p\nkdazb zjs\nmbk ykvqjrxaxu\nhbcwhouzq pwt\nmirpsz zfaegpl\nuhkkvcj rlvwj\nef iqnnwtolrc\npjzfcpmeag ecdayth\nsa qcthz\ncbfhfxi qrnbv... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nWrite a function to calculate compound tax using the following table:\n\nFor $10 and under, the tax rate should be 10%.\nFor $20 and under, the tax rate on the first $10 is %10, and the tax on the rest is 7%.\nFor $30 and... | [{"input": "1000000", "output": "[30001.3]", "fn_name": "tax_calculator"}, {"input": "30.49", "output": "[2.21]", "fn_name": "tax_calculator"}, {"input": "\"monkey\"", "output": "[0]", "fn_name": "tax_calculator"}, {"input": "11", "output": "[1.07]", "fn_name": "tax_calculator"}, {"input": "15", "output": "[1.35]", "fn... | code_functional |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nIn music, if you double (or halve) the pitch of any note you will get to the same note again.\n\n\"Concert A\" is fixed at 440 Hz, and every other note is defined based on that. 880 Hz is also an A, as is 1760 Hz, as is 2... | [{"input": "261.625", "output": "[\"C\"]", "fn_name": "get_note"}, {"input": "523.25", "output": "[\"C\"]", "fn_name": "get_note"}, {"input": "1046.5", "output": "[\"C\"]", "fn_name": "get_note"}, {"input": "440", "output": "[\"A\"]", "fn_name": "get_note"}, {"input": "220", "output": "[\"A\"]", "fn_name": "get_note"},... | code_functional |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nMoamen and Ezzat are playing a game. They create an array $a$ of $n$ non-negative integers where every element is less than $2^k$.\n\nMoamen wins if $a_1 \\,\\&\\, a_2 \\,\\&\\, a_3 \\,\\&\\, \\ldots \\,\\&\\, a_n \\ge a_... | [{"type": "stdin_stdout", "input": "5\n200000 200000\n200000 200000\n200000 200000\n200000 200000\n200000 200000\n", "output": "226490044\n226490044\n226490044\n226490044\n226490044\n"}, {"type": "stdin_stdout", "input": "5\n200000 200000\n200000 200000\n200000 200000\n200000 200000\n200000 200000\n", "output": "226490... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nGiven is a positive integer N. Consider repeatedly applying the operation below on N:\n - First, choose a positive integer z satisfying all of the conditions below:\n - z can be represented as z=p^e, where p is a prime nu... | [{"type": "stdin_stdout", "input": "1000000000000\n", "output": "8\n"}, {"type": "stdin_stdout", "input": "200560490130\n", "output": "11\n"}, {"type": "stdin_stdout", "input": "755827200000\n", "output": "10\n"}, {"type": "stdin_stdout", "input": "366735600000\n", "output": "10\n"}, {"type": "stdin_stdout", "input": "... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nIn the evening Polycarp decided to analyze his today's travel expenses on public transport.\n\nThe bus system in the capital of Berland is arranged in such a way that each bus runs along the route between two stops. Each ... | [{"type": "stdin_stdout", "input": "27 8 1 0 1\nBcd A\nA b\nb BcDc\ndc dbaC\ndbaC dcCB\nB d\nd BbAc\nCBC b\nDBDca d\ncAbb AA\nAA Ba\ncAccb DBDca\ncb DdaB\nAAcBc Ba\nBa dc\ndc DDCd\nbcBDA da\nbDD ADD\nAA b\nb cb\ncb CCBbd\nCCBbd bcDdb\nbcDdb ddc\nddc C\nC Adc\nAdc BbAc\nBbAc DD\n", "output": "111\n"}, {"type": "stdin_st... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nEvlampiy has found one more cool application to process photos. However the application has certain limitations.\n\nEach photo i has a contrast v_{i}. In order for the processing to be truly of high quality, the applicati... | [{"type": "stdin_stdout", "input": "101 9\n3 2 2 1 4 1 3 2 3 4 3 2 3 1 4 4 1 1 4 1 3 3 4 1 2 1 1 3 1 2 2 4 3 1 4 3 1 1 4 4 1 2 1 1 4 2 3 4 1 2 1 4 4 1 4 3 1 4 2 1 2 1 4 3 4 3 4 2 2 4 3 2 1 3 4 3 2 2 4 3 3 2 4 1 3 2 2 4 1 3 4 2 1 3 3 2 2 1 1 3 1\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "101 9\n3 2 2 1 4 1... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nVladimir would like to prepare a present for his wife: they have an anniversary! He decided to buy her exactly $n$ flowers.\n\nVladimir went to a flower shop, and he was amazed to see that there are $m$ types of flowers b... | [{"type": "stdin_stdout", "input": "1\n7 7\n873108721 195635452\n42649954 997221147\n873108721 1003477544\n1087176458 873108721\n1130734166 858693746\n1309378041 372607189\n1000000000 427003887\n", "output": "7410830018\n"}, {"type": "stdin_stdout", "input": "1\n7 7\n873108721 195635452\n66631086 997221147\n1700956320 ... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nRead problems statements in Mandarin Chinese, Russian and Vietnamese as well. \nZombies zombies everywhere!! \nIn a parallel world of zombies, there are N zombies. There are infinite number of unused cars, each of same mo... | [{"type": "stdin_stdout", "input": "2\n2 6\n16 17", "output": "30\n118740505\n"}, {"type": "stdin_stdout", "input": "2\n2 6\n19 17", "output": "30\n361105078\n"}, {"type": "stdin_stdout", "input": "2\n2 6\n29 17", "output": "30\n684841218\n"}, {"type": "stdin_stdout", "input": "2\n2 6\n19 34", "output": "30\n525446287\... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nWrite a program which reads an integer $S$ [second] and converts it to $h:m:s$ where $h$, $m$, $s$ denote hours, minutes (less than 60) and seconds (less than 60) respectively.\n\nConstraints\n\n* $0 \\leq S \\leq 86400$\... | [{"type": "stdin_stdout", "input": "71983", "output": "19:59:43\n"}, {"type": "stdin_stdout", "input": "-1025", "output": "-1:42:55\n"}, {"type": "stdin_stdout", "input": "-144", "output": "-1:57:36\n"}, {"type": "stdin_stdout", "input": "-274", "output": "-1:55:26\n"}, {"type": "stdin_stdout", "input": "-399", "output... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nYou are given four integer values $a$, $b$, $c$ and $m$.\n\nCheck if there exists a string that contains:\n\n$a$ letters 'A';\n\n$b$ letters 'B';\n\n$c$ letters 'C';\n\nno other letters;\n\nexactly $m$ pairs of adjacent e... | [{"type": "stdin_stdout", "input": "3\n2 2 1 0\n2 1 1 1\n1 2 3 2\n", "output": "YES\nYES\nYES\n"}, {"type": "stdin_stdout", "input": "3\n2 2 1 0\n1 1 1 1\n1 2 3 2\n", "output": "YES\nNO\nYES\n"}, {"type": "stdin_stdout", "input": "3\n3 2 1 0\n1 1 1 1\n1 2 3 2\n", "output": "YES\nNO\nYES\n"}, {"type": "stdin_stdout", "i... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nYour mission in this problem is to write a computer program that manipulates molecular for- mulae in virtual chemistry. As in real chemistry, each molecular formula represents a molecule consisting of one or more atoms. H... | [{"type": "stdin_stdout", "input": "H 1\neI 5\nC 12\nO 16\nF 22\nNe 24\nEu 64\nCc 241\nEND_OF_FIRST_PART\nG2C\n(MhF)2As\nCu(OH)2\nH((CO)2F)99\n0", "output": "UNKNOWN\nUNKNOWN\nUNKNOWN\n7723\n"}, {"type": "stdin_stdout", "input": "H 0\nHe 4\nC 12\nO 26\nF 2\nOe 36\nvC 64\nCc 603\nEND_OF_FIRST_PART\nH2B\n(MgF)2As\nBu(OH)... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nValera is a lazy student. He has m clean bowls and k clean plates. \n\nValera has made an eating plan for the next n days. As Valera is lazy, he will eat exactly one dish per day. At that, in order to eat a dish, he needs... | [{"type": "stdin_stdout", "input": "233 100 1\n2 2 1 1 1 2 2 2 2 1 1 2 2 2 1 2 2 1 1 1 2 2 1 1 1 1 2 1 2 2 1 1 2 2 1 2 2 1 2 1 2 1 2 2 2 1 1 1 1 2 1 2 1 1 2 1 1 2 2 1 2 1 2 1 1 1 1 1 1 1 1 1 2 1 2 2 2 1 1 2 2 1 1 1 1 2 1 1 2 1 2 2 2 1 1 1 2 2 2 1 1 1 1 2 1 2 1 1 1 1 2 2 2 1 1 2 1 2 1 1 1 1 1 2 1 1 1 1 1 2 1 1 2 2 1 2 1... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nYou are making your very own boardgame. The game is played by two opposing players, featuring a 6 x 6 tile system, with the players taking turns to move their pieces (similar to chess). The design is finished, now it's ti... | [{"input": "\"k\"\n\"A\"", "output": "[\"k\"]", "fn_name": "fight_resolve"}, {"input": "\"K\"\n\"a\"", "output": "[\"K\"]", "fn_name": "fight_resolve"}, {"input": "\"K\"\n\"A\"", "output": "[-1]", "fn_name": "fight_resolve"}, {"input": "\"S\"\n\"A\"", "output": "[-1]", "fn_name": "fight_resolve"}, {"input": "\"k\"\n\"s... | code_functional |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nBurenka came to kindergarden. This kindergarten is quite strange, so each kid there receives two fractions ($\\frac{a}{b}$ and $\\frac{c}{d}$) with integer numerators and denominators. Then children are commanded to play ... | [{"type": "stdin_stdout", "input": "7\n1000000000 999999999 999999999 999999998\n999999997 999999996 999999996 999999995\n999999994 999999993 999999993 999999992\n999999991 999999990 999999990 999999989\n999999988 999999987 999999987 999999986\n999999985 999999984 999999984 999999983\n999999982 999999981 999999981 9999... | code_stdio |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.