question large_stringlengths 265 13.2k |
|---|
Solve the programming task below in a Python markdown code block.
View Russian Translation
Tom works in a public library in his town. Today, a completely new set of N books is arriving to the library and they have to be placed on shelves, which are initially empty.
A single shelf can contain at most 10 books and any... |
Solve the programming task below in a Python markdown code block.
Little Monk is an extremely miser person. He hates spending money on things, be it for his own good or bad. But this time his friends have caught up with him, and are demanding a huge birthday treat. But, Monk is... well, Monk.
He figured out that the... |
Solve the programming task below in a Python markdown code block.
Roy has a wooden log (tree trunk) of length L units.
Since the log is too heavy for him to lift, he wants to cut it into pieces.
He can lift pieces of length 1 or 2 units.
He wonders in how many ways can he make such pieces of the wooden log.
Now ... |
Solve the programming task below in a Python markdown code block.
Given is an integer N. Snuke will choose integers s_1, s_2, n_1, n_2, u_1, u_2, k_1, k_2, e_1, and e_2 so that all of the following six conditions will be satisfied:
* 0 \leq s_1 < s_2
* 0 \leq n_1 < n_2
* 0 \leq u_1 < u_2
* 0 \leq k_1 < k_2
* 0 \leq e... |
Solve the programming task below in a Python markdown code block.
We have a board with H horizontal rows and W vertical columns of squares. There is a bishop at the top-left square on this board. How many squares can this bishop reach by zero or more movements?
Here the bishop can only move diagonally. More formally,... |
Solve the programming task below in a Python markdown code block.
There are three airports A, B and C, and flights between each pair of airports in both directions.
A one-way flight between airports A and B takes P hours, a one-way flight between airports B and C takes Q hours, and a one-way flight between airports C... |
Solve the programming task below in a Python markdown code block.
A university student, Takahashi, has to take N examinations and pass all of them. Currently, his readiness for the i-th examination is A_{i}, and according to his investigation, it is known that he needs readiness of at least B_{i} in order to pass the ... |
Solve the programming task below in a Python markdown code block.
There are N islands lining up from west to east, connected by N-1 bridges.
The i-th bridge connects the i-th island from the west and the (i+1)-th island from the west.
One day, disputes took place between some islands, and there were M requests from ... |
Solve the programming task below in a Python markdown code block.
You are given an integer sequence of length N, a_1,a_2,...,a_N.
For each 1β€iβ€N, you have three choices: add 1 to a_i, subtract 1 from a_i or do nothing.
After these operations, you select an integer X and count the number of i such that a_i=X.
Maximi... |
Solve the programming task below in a Python markdown code block.
The king of a country loves prime numbers and gambling. The unit of currency in this country is called prime. As of November 1, 2007, Prime's cross-yen rate was just prime at 9973, so the King is overjoyed. Subsidiary coins with 1/101 prime as one subpr... |
Solve the programming task below in a Python markdown code block.
On the Internet shopping site, on the same page as the product that the user is currently viewing, some other products that other users have bought in the past along with the product that they are currently viewing are displayed. It is believed that sal... |
Solve the programming task below in a Python markdown code block.
The rabbit, who successfully defeated the ambushed enemy, succeeded in advancing the hero into the enemy's castle. When the hero released the cats trapped in the castle dungeon, some of them were the hero's. It will help me.
According to the cats, to r... |
Solve the programming task below in a Python markdown code block.
You can obtain profits from foreign exchange margin transactions. For example, if you buy 1000 dollar at a rate of 100 yen per dollar, and sell them at a rate of 108 yen per dollar, you can obtain (108 - 100) Γ 1000 = 8000 yen.
Write a program which re... |
Solve the programming task below in a Python markdown code block.
Innopolis University scientists continue to investigate the periodic table. There are nΒ·m known elements and they form a periodic table: a rectangle with n rows and m columns. Each element can be described by its coordinates (r, c) (1 β€ r β€ n, 1 β€ c β€ m... |
Solve the programming task below in a Python markdown code block.
Consider a tree T (that is, a connected graph without cycles) with n vertices labelled 1 through n. We start the following process with T: while T has more than one vertex, do the following:
* choose a random edge of T equiprobably;
* shrink the ch... |
Solve the programming task below in a Python markdown code block.
You are given a sequence of integers a_1, a_2, ..., a_n. You need to paint elements in colors, so that:
* If we consider any color, all elements of this color must be divisible by the minimal element of this color.
* The number of used colors mus... |
Solve the programming task below in a Python markdown code block.
[Γsir - CHAOS](https://soundcloud.com/kivawu/aesir-chaos)
[Γsir - V.](https://soundcloud.com/kivawu/aesir-v)
"Everything has been planned out. No more hidden concerns. The condition of Cytus is also perfect.
The time right now...... 00:01:12......
I... |
Solve the programming task below in a Python markdown code block.
You are given an array a_1, a_2, ..., a_n. You can perform the following operation any number of times:
* Choose a pair of two neighboring equal elements a_i = a_{i + 1} (if there is at least one such pair).
* Replace them by one element with valu... |
Solve the programming task below in a Python markdown code block.
You are given an array a of length n, which initially is a permutation of numbers from 1 to n. In one operation, you can choose an index i (1 β€ i < n) such that a_i < a_{i + 1}, and remove either a_i or a_{i + 1} from the array (after the removal, the r... |
Solve the programming task below in a Python markdown code block.
Alice and Bob play a game. The game consists of several sets, and each set consists of several rounds. Each round is won either by Alice or by Bob, and the set ends when one of the players has won x rounds in a row. For example, if Bob won five rounds i... |
Solve the programming task below in a Python markdown code block.
A matrix of size n Γ m is called nice, if all rows and columns of the matrix are palindromes. A sequence of integers (a_1, a_2, ... , a_k) is a palindrome, if for any integer i (1 β€ i β€ k) the equality a_i = a_{k - i + 1} holds.
Sasha owns a matrix a o... |
Solve the programming task below in a Python markdown code block.
You are given four integers n, c_0, c_1 and h and a binary string s of length n.
A binary string is a string consisting of characters 0 and 1.
You can change any character of the string s (the string should be still binary after the change). You shoul... |
Solve the programming task below in a Python markdown code block.
You are given a sequence of n integers a_1, a_2, ..., a_n. Let us call an index j (2 β€ j β€ {{n-1}}) a hill if a_j > a_{{j+1}} and a_j > a_{{j-1}}; and let us call it a valley if a_j < a_{{j+1}} and a_j < a_{{j-1}}.
Let us define the intimidation value ... |
Solve the programming task below in a Python markdown code block.
Let F_k denote the k-th term of Fibonacci sequence, defined as below:
* F_0 = F_1 = 1
* for any integer n β₯ 0, F_{n+2} = F_{n+1} + F_n
You are given a tree with n vertices. Recall that a tree is a connected undirected graph without cycles.
We c... |
Solve the programming task below in a Python markdown code block.
Baby Badawy's first words were "AND 0 SUM BIG", so he decided to solve the following problem. Given two integers n and k, count the number of arrays of length n such that:
* all its elements are integers between 0 and 2^k-1 (inclusive);
* the [bit... |
Solve the programming task below in a Python markdown code block.
You are given an array a_1, a_2, ..., a_n consisting of n distinct integers. Count the number of pairs of indices (i, j) such that i < j and a_i β
a_j = i + j.
Input
The first line contains one integer t (1 β€ t β€ 10^4) β the number of test cases. Then... |
Solve the programming task below in a Python markdown code block.
Maxim has opened his own restaurant! The restaurant has got a huge table, the table's length is p meters.
Maxim has got a dinner party tonight, n guests will come to him. Let's index the guests of Maxim's restaurant from 1 to n. Maxim knows the sizes o... |
Solve the programming task below in a Python markdown code block.
Petya and Vasya are playing a game. Petya's got n non-transparent glasses, standing in a row. The glasses' positions are indexed with integers from 1 to n from left to right. Note that the positions are indexed but the glasses are not.
First Petya puts... |
Solve the programming task below in a Python markdown code block.
The king Copa often has been reported about the Codeforces site, which is rapidly getting more and more popular among the brightest minds of the humanity, who are using it for training and competing. Recently Copa understood that to conquer the world he... |
Solve the programming task below in a Python markdown code block.
A group of tourists is going to kayak and catamaran tour. A rented lorry has arrived to the boat depot to take kayaks and catamarans to the point of departure. It's known that all kayaks are of the same size (and each of them occupies the space of 1 cub... |
Solve the programming task below in a Python markdown code block.
Polar bears Menshykov and Uslada from the zoo of St. Petersburg and elephant Horace from the zoo of Kiev decided to build a house of cards. For that they've already found a hefty deck of n playing cards. Let's describe the house they want to make:
1... |
Solve the programming task below in a Python markdown code block.
In this problem is used an extremely simplified version of HTML table markup. Please use the statement as a formal document and read it carefully.
A string is a bHTML table, if it satisfies the grammar:
TABLE ::= <table>ROWS</tabl... |
Solve the programming task below in a Python markdown code block.
Two bored soldiers are playing card war. Their card deck consists of exactly n cards, numbered from 1 to n, all values are different. They divide cards between them in some manner, it's possible that they have different number of cards. Then they play a... |
Solve the programming task below in a Python markdown code block.
Edo has got a collection of n refrigerator magnets!
He decided to buy a refrigerator and hang the magnets on the door. The shop can make the refrigerator with any size of the door that meets the following restrictions: the refrigerator door must be rec... |
Solve the programming task below in a Python markdown code block.
You are given two very long integers a, b (leading zeroes are allowed). You should check what number a or b is greater or determine that they are equal.
The input size is very large so don't use the reading of symbols one by one. Instead of that use th... |
Solve the programming task below in a Python markdown code block.
A remote island chain contains n islands, labeled 1 through n. Bidirectional bridges connect the islands to form a simple cycle β a bridge connects islands 1 and 2, islands 2 and 3, and so on, and additionally a bridge connects islands n and 1. The cent... |
Solve the programming task below in a Python markdown code block.
Greatest common divisor GCD(a, b) of two positive integers a and b is equal to the biggest integer d such that both integers a and b are divisible by d. There are many efficient algorithms to find greatest common divisor GCD(a, b), for example, Euclid a... |
Solve the programming task below in a Python markdown code block.
Today Pari and Arya are playing a game called Remainders.
Pari chooses two positive integer x and k, and tells Arya k but not x. Arya have to find the value <image>. There are n ancient numbers c1, c2, ..., cn and Pari has to tell Arya <image> if Arya ... |
Solve the programming task below in a Python markdown code block.
Find an n Γ n matrix with different numbers from 1 to n2, so the sum in each row, column and both main diagonals are odd.
Input
The only line contains odd integer n (1 β€ n β€ 49).
Output
Print n lines with n integers. All the integers should be diffe... |
Solve the programming task below in a Python markdown code block.
Arseniy is already grown-up and independent. His mother decided to leave him alone for m days and left on a vacation. She have prepared a lot of food, left some money and washed all Arseniy's clothes.
Ten minutes before her leave she realized that it ... |
Solve the programming task below in a Python markdown code block.
A new dog show on TV is starting next week. On the show dogs are required to demonstrate bottomless stomach, strategic thinking and self-preservation instinct. You and your dog are invited to compete with other participants and naturally you want to win... |
Solve the programming task below in a Python markdown code block.
There are n incoming messages for Vasya. The i-th message is going to be received after ti minutes. Each message has a cost, which equals to A initially. After being received, the cost of a message decreases by B each minute (it can become negative). Va... |
Solve the programming task below in a Python markdown code block.
After passing a test, Vasya got himself a box of n candies. He decided to eat an equal amount of candies each morning until there are no more candies. However, Petya also noticed the box and decided to get some candies for himself.
This means the proce... |
Solve the programming task below in a Python markdown code block.
Chang loves solving mathematical puzzles. One day he was solving a puzzle. According to the problem statement of the puzzle: "there are N integers. you are asked to delete some numbers such that the series obtained after deletion follows the condition. ... |
Solve the programming task below in a Python markdown code block.
Rakesh is very good in divisibility. He can easily tell the number is divisible by the given number or not. To make him work harder his teacher changed the question slightly. He will give the number and the other number with which the first number is di... |
Solve the programming task below in a Python markdown code block.
Little Fajlu and Laal Baadshah are extremely good, and passionate Age of Empires 2 players. They're crazy about the game, and the passion they display for the game, if displayed for their semester exams - will make them top the university, even. But wel... |
Solve the programming task below in a Python markdown code block.
Let there be a set of size N.
Power set of a set S, denoted by P(S) is the set of all subsets of S, including the empty set and the S itself.
Set A is said to be subset of set B if all elements of A are contained in B. Empty set is always a subset of ... |
Solve the programming task below in a Python markdown code block.
AtCoder currently hosts three types of contests: ABC, ARC, and AGC. As the number of users has grown, in order to meet the needs of more users, AtCoder has decided to increase the number of contests to 26 types, from AAC to AZC. For convenience, we numb... |
Solve the programming task below in a Python markdown code block.
We have a tree with N vertices. The vertices are numbered 1 to N, and the i-th edge connects Vertex a_i and Vertex b_i.
Takahashi loves the number 3. He is seeking a permutation p_1, p_2, \ldots , p_N of integers from 1 to N satisfying the following co... |
Solve the programming task below in a Python markdown code block.
Takahashi and Aoki will take N exams numbered 1 to N. They have decided to compete in these exams. The winner will be determined as follows:
* For each exam i, Takahashi decides its importance c_i, which must be an integer between l_i and u_i (inclusiv... |
Solve the programming task below in a Python markdown code block.
The server in company A has a structure where N devices numbered 1, 2, ..., N are connected with N - 1 cables. The i-th cable connects Device U_i and Device V_i. Any two different devices are connected through some number of cables.
Each device v (1 \l... |
Solve the programming task below in a Python markdown code block.
You are given two integers a and b. Determine if a+b=15 or a\times b=15 or neither holds.
Note that a+b=15 and a\times b=15 do not hold at the same time.
Constraints
* 1 \leq a,b \leq 15
* All values in input are integers.
Input
Input is given from... |
Solve the programming task below in a Python markdown code block.
AtCoDeer the deer has N cards with positive integers written on them. The number on the i-th card (1β€iβ€N) is a_i. Because he loves big numbers, he calls a subset of the cards good when the sum of the numbers written on the cards in the subset, is K or g... |
Solve the programming task below in a Python markdown code block.
One of the simple ciphers is the affine cipher. First, replace the letters a to z with the numbers a = 0, b = 1, c = 2, ..., x = 23, y = 24, z = 25 and 0 to 25. Then replace the original alphabet with the following formula.
$ F (\ gamma) = (\ alpha \ c... |
Solve the programming task below in a Python markdown code block.
You have to organize a wedding party. The program of the party will include a concentration game played by the bride and groom. The arrangement of the concentration game should be easy since this game will be played to make the party fun.
We have a 4x4... |
Solve the programming task below in a Python markdown code block.
Ms. Iyo Kiffa-Australis has a balance and only two kinds of weights to measure a dose of medicine.
For example, to measure 200mg of aspirin using 300mg weights and 700mg weights, she can put one 700mg weight on the side of the medicine and three 300mg ... |
Solve the programming task below in a Python markdown code block.
This is a story in a depopulated area. In this area, houses are sparsely built along a straight road called Country Road. Until now, there was no electricity in this area, but this time the government will give us some generators. You can install the ge... |
Solve the programming task below in a Python markdown code block.
The cave, called "Mass of Darkness", had been a agitating point of the evil, but the devil king and all of his soldiers were destroyed by the hero and the peace is there now.
One day, however, the hero was worrying about the rebirth of the devil king, ... |
Solve the programming task below in a Python markdown code block.
Taro is an elementary school student and has graffiti on the back of the leaflet. At one point, Taro came up with the next game.
* Write n Γ n grid-like squares.
* The initial state of each square is either marked or unmarked.
* Erase or write these ci... |
Solve the programming task below in a Python markdown code block.
E-Election campaign
Problem Statement
You are a supporter of Mr. X, a candidate for the next election. Mr. X is planning a street speech in front of the station and intends to give a speech in a place that can be seen by as many voters as possible.
T... |
Solve the programming task below in a Python markdown code block.
Problem
Let $ f (x) $ be the sum of each digit when the non-negative integer $ x $ is expressed in binary.
Given a positive integer $ N $, output the largest of $ f (0) $, $ f (1) $, ..., $ f (N) $.
Example of calculating the function $ f (5) $:
When... |
Solve the programming task below in a Python markdown code block.
Your task is to implement a double linked list.
Write a program which performs the following operations:
* insert x: insert an element with key x into the front of the list.
* delete x: delete the first element which has the key of x from the list. If... |
Solve the programming task below in a Python markdown code block.
On a chessboard with a width of 10^9 and a height of 10^9, the rows are numbered from bottom to top from 1 to 10^9, and the columns are numbered from left to right from 1 to 10^9. Therefore, for each cell of the chessboard you can assign the coordinates... |
Solve the programming task below in a Python markdown code block.
Maksim walks on a Cartesian plane. Initially, he stands at the point (0, 0) and in one move he can go to any of four adjacent points (left, right, up, down). For example, if Maksim is currently at the point (0, 0), he can go to any of the following poin... |
Solve the programming task below in a Python markdown code block.
International Coding Procedures Company (ICPC) writes all its code in Jedi Script (JS) programming language. JS does not get compiled, but is delivered for execution in its source form. Sources contain comments, extra whitespace (including trailing and ... |
Solve the programming task below in a Python markdown code block.
You have a garland consisting of n lamps. Each lamp is colored red, green or blue. The color of the i-th lamp is s_i ('R', 'G' and 'B' β colors of lamps in the garland).
You have to recolor some lamps in this garland (recoloring a lamp means changing i... |
Solve the programming task below in a Python markdown code block.
You are given a string, consisting of lowercase Latin letters.
A pair of neighbouring letters in a string is considered ugly if these letters are also neighbouring in a alphabet. For example, string "abaca" contains ugly pairs at positions (1, 2) β "ab... |
Solve the programming task below in a Python markdown code block.
Alice bought a Congo Prime Video subscription and was watching a documentary on the archaeological findings from Factor's Island on Loch Katrine in Scotland. The archaeologists found a book whose age and origin are unknown. Perhaps Alice can make some s... |
Solve the programming task below in a Python markdown code block.
The only difference between easy and hard versions is the size of the input.
You are given a string s consisting of n characters, each character is 'R', 'G' or 'B'.
You are also given an integer k. Your task is to change the minimum number of characte... |
Solve the programming task below in a Python markdown code block.
Authors have come up with the string s consisting of n lowercase Latin letters.
You are given two permutations of its indices (not necessary equal) p and q (both of length n). Recall that the permutation is the array of length n which contains each int... |
Solve the programming task below in a Python markdown code block.
Consider a tunnel on a one-way road. During a particular day, n cars numbered from 1 to n entered and exited the tunnel exactly once. All the cars passed through the tunnel at constant speeds.
A traffic enforcement camera is mounted at the tunnel entra... |
Solve the programming task below in a Python markdown code block.
Bob watches TV every day. He always sets the volume of his TV to b. However, today he is angry to find out someone has changed the volume to a. Of course, Bob has a remote control that can change the volume.
There are six buttons (-5, -2, -1, +1, +2, +... |
Solve the programming task below in a Python markdown code block.
Consider the following experiment. You have a deck of m cards, and exactly one card is a joker. n times, you do the following: shuffle the deck, take the top card of the deck, look at it and return it into the deck.
Let x be the number of times you hav... |
Solve the programming task below in a Python markdown code block.
There are n water tanks in a row, i-th of them contains a_i liters of water. The tanks are numbered from 1 to n from left to right.
You can perform the following operation: choose some subsegment [l, r] (1β€ l β€ r β€ n), and redistribute water in tanks l... |
Solve the programming task below in a Python markdown code block.
A bracketed sequence is called correct (regular) if by inserting "+" and "1" you can get a well-formed mathematical expression from it. For example, sequences "(())()", "()" and "(()(()))" are correct, while ")(", "(()" and "(()))(" are not.
The teache... |
Solve the programming task below in a Python markdown code block.
Koa the Koala and her best friend want to play a game.
The game starts with an array a of length n consisting of non-negative integers. Koa and her best friend move in turns and each have initially a score equal to 0. Koa starts.
Let's describe a move... |
Solve the programming task below in a Python markdown code block.
Chaneka has a hobby of playing with animal toys. Every toy has a different fun value, a real number. Chaneka has four boxes to store the toys with specification:
* The first box stores toys with fun values in range of (-β,-1].
* The second box st... |
Solve the programming task below in a Python markdown code block.
For a given sequence of distinct non-negative integers (b_1, b_2, ..., b_k) we determine if it is good in the following way:
* Consider a graph on k nodes, with numbers from b_1 to b_k written on them.
* For every i from 1 to k: find such j (1 β€ j ... |
Solve the programming task below in a Python markdown code block.
Alice and Bob are going to celebrate Christmas by playing a game with a tree of presents. The tree has n nodes (numbered 1 to n, with some node r as its root). There are a_i presents are hanging from the i-th node.
Before beginning the game, a special ... |
Solve the programming task below in a Python markdown code block.
You are playing the game "Arranging The Sheep". The goal of this game is to make the sheep line up. The level in the game is described by a string of length n, consisting of the characters '.' (empty space) and '*' (sheep). In one move, you can move any... |
Solve the programming task below in a Python markdown code block.
To get money for a new aeonic blaster, ranger Qwerty decided to engage in trade for a while. He wants to buy some number of items (or probably not to buy anything at all) on one of the planets, and then sell the bought items on another planet. Note that... |
Solve the programming task below in a Python markdown code block.
Learn, learn and learn again β Valera has to do this every day. He is studying at mathematical school, where math is the main discipline. The mathematics teacher loves her discipline very much and tries to cultivate this love in children. That's why she... |
Solve the programming task below in a Python markdown code block.
One day, little Vasya found himself in a maze consisting of (n + 1) rooms, numbered from 1 to (n + 1). Initially, Vasya is at the first room and to get out of the maze, he needs to get to the (n + 1)-th one.
The maze is organized as follows. Each room ... |
Solve the programming task below in a Python markdown code block.
Student Valera is an undergraduate student at the University. His end of term exams are approaching and he is to pass exactly n exams. Valera is a smart guy, so he will be able to pass any exam he takes on his first try. Besides, he can take several exa... |
Solve the programming task below in a Python markdown code block.
Let's define a forest as a non-directed acyclic graph (also without loops and parallel edges). One day Misha played with the forest consisting of n vertices. For each vertex v from 0 to n - 1 he wrote down two integers, degreev and sv, were the first in... |
Solve the programming task below in a Python markdown code block.
One day Vasya was sitting on a not so interesting Maths lesson and making an origami from a rectangular a mm Γ b mm sheet of paper (a > b). Usually the first step in making an origami is making a square piece of paper from the rectangular sheet by fol... |
Solve the programming task below in a Python markdown code block.
Vanya got bored and he painted n distinct points on the plane. After that he connected all the points pairwise and saw that as a result many triangles were formed with vertices in the painted points. He asks you to count the number of the formed triangl... |
Solve the programming task below in a Python markdown code block.
A string is called palindrome if it reads the same from left to right and from right to left. For example "kazak", "oo", "r" and "mikhailrubinchikkihcniburliahkim" are palindroms, but strings "abb" and "ij" are not.
You are given string s consisting of... |
Solve the programming task below in a Python markdown code block.
We all know the impressive story of Robin Hood. Robin Hood uses his archery skills and his wits to steal the money from rich, and return it to the poor.
There are n citizens in Kekoland, each person has ci coins. Each day, Robin Hood will take exactly ... |
Solve the programming task below in a Python markdown code block.
Alyona has a tree with n vertices. The root of the tree is the vertex 1. In each vertex Alyona wrote an positive integer, in the vertex i she wrote ai. Moreover, the girl wrote a positive integer to every edge of the tree (possibly, different integers o... |
Solve the programming task below in a Python markdown code block.
You are given two integers n and k. Find k-th smallest divisor of n, or report that it doesn't exist.
Divisor of n is any such natural number, that n can be divided by it without remainder.
Input
The first line contains two integers n and k (1 β€ n β€ ... |
Solve the programming task below in a Python markdown code block.
Anton likes to play chess. Also he likes to do programming. No wonder that he decided to attend chess classes and programming classes.
Anton has n variants when he will attend chess classes, i-th variant is given by a period of time (l1, i, r1, i). Als... |
Solve the programming task below in a Python markdown code block.
Not so long ago the Codecraft-17 contest was held on Codeforces. The top 25 participants, and additionally random 25 participants out of those who got into top 500, will receive a Codeforces T-shirt.
Unfortunately, you didn't manage to get into top 25,... |
Solve the programming task below in a Python markdown code block.
Polycarp watched TV-show where k jury members one by one rated a participant by adding him a certain number of points (may be negative, i. e. points were subtracted). Initially the participant had some score, and each the marks were one by one added to ... |
Solve the programming task below in a Python markdown code block.
You all know that the Library of Bookland is the largest library in the world. There are dozens of thousands of books in the library.
Some long and uninteresting story was removed...
The alphabet of Bookland is so large that its letters are denoted by... |
Solve the programming task below in a Python markdown code block.
One Martian boy called Zorg wants to present a string of beads to his friend from the Earth β Masha. He knows that Masha likes two colours: blue and red, β and right in the shop where he has come, there is a variety of adornments with beads of these two... |
Solve the programming task below in a Python markdown code block.
Pushok the dog has been chasing Imp for a few hours already.
<image>
Fortunately, Imp knows that Pushok is afraid of a robot vacuum cleaner.
While moving, the robot generates a string t consisting of letters 's' and 'h', that produces a lot of noise... |
Solve the programming task below in a Python markdown code block.
There are n dormitories in Berland State University, they are numbered with integers from 1 to n. Each dormitory consists of rooms, there are a_i rooms in i-th dormitory. The rooms in i-th dormitory are numbered from 1 to a_i.
A postman delivers letter... |
Solve the programming task below in a Python markdown code block.
This is a fact for almost all the students out there that Mathematics subject is a very fearful subject for them.
And no wonder this fact is also true for our friend Primo. But to challenge his fear he went to the Mathe-Matica Town for his summer vacat... |
Solve the programming task below in a Python markdown code block.
I and my flatmate ,Sayan, went to see the magnificient fountains in the Jubilee park on 3rd March.It was the eve of the 184rd Bithday of the late Mr. J.N.Tata and the fountains were set to blow at regular intervals.
I sat down praising the scenic beauty... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.