112A Petya and Strings
Little Petya loves presents. His mum bought him two strings of the same size for his birthday
Read more →Little Petya loves presents. His mum bought him two strings of the same size for his birthday
Read more →Let's define a split of n as a nonincreasing sequence of positive integers, the sum of which is n
Read more →Mishka got a six-faced dice. It has integer numbers from 2 to 7 written on its faces
Read more →Anton likes to listen to fairy tales, especially when Danik, Anton's best friend, tells them. Right now Danik tells Anton a fairy tale.
Read more →There is the faculty of Computer Science in Berland. In the social net "TheContact.
Read more →Maxim wants to buy an apartment in a new house at Line Avenue of Metropolis.
Read more →Mikhail walks on a 2D plane. He can go either up or right. You are given a sequence of Mikhail's moves. He thinks that this sequence is too long and he wants.
Read more →A sentence is a list of words that are separated by a single space with no leading or trailing spaces
Read more →Vasily the Programmer loves romance, so this year he decided to illuminate his room with candles
Read more →Chouti was doing a competitive programming competition.
Read more →Let's define a split of n as a nonincreasing sequence of positive integers, the sum of which is n
Read more →You can not just take the file and send it. When Polycarp trying to send a file in the social network.
Read more →There are n stones on the table in a row, each of them can be red
Read more →Ivan has number b He is sorting through the numbers a from 1
Read more →Polycarp loves lowercase letters and dislikes uppercase ones. Once he got a string s consisting only of lowercase and uppercase Latin letters.
Read more →Alice and Bob are playing a game on an array a of n positive integers
Read more →In the army, it isn't easy to form a group of soldiers that will be effective on the battlefield. The communication is crucial and thus no two soldiers should
Read more →There is a house with n flats situated on the main street of Berlatov.
Read more →Ivan is collecting coins. There are only N different collectible coins, Ivan has K of them
Read more →To make a paper airplane, one has to use a rectangular piece of paper. From a sheet of standard size you can make s airplanes.
Read more →A few years ago Sajjad left his school and register to another one due to security reasons. Now he wishes to find Amir, one of his schoolmates and good friends.
Read more →For simplicity, we'll assume that there are only three types of grapes: green grapes, purple grapes and black grapes.
Read more →On an 8×8 grid, some horizontal rows have been painted red, and some vertical columns have been painted blue
Read more →You are given k sequences of integers. The length of the i-th sequence equals to ni .
Read more →In Summer Informatics School, if a student doesn't behave well, teachers make a hole in his badge. And today one of the teachers caught a group of n students
Read more →Anton has the integer x. He is interested what positive integer, which doesn't exceed x, has the maximum sum of digits.
Read more →Alex, Bob and Carl will soon participate in a team chess tournament.
Read more →Berland Football Cup starts really soon! Commentators from all over the world come to the event.
Read more →Mister B once received a gift: it was a book about aliens, which he started read immediately. This book had c pages.
Read more →Allen has a LOT of money. He has n dollars in the bank
Read more →Recently, he found a machine that can clone plush toys
Read more →A soldier wants to buy w bananas in the shop. He has to pay k dollars for the first banana.
Read more →Two boys decided to compete in text typing on the site "Key races". During the competition, they have to type a text consisting of s characters
Read more →There are literally dozens of snooker competitions held each year, and team Jinotega
Read more →You have n coins, each of the same value of 1.
Read more →QAQ" is a word to denote an expression of crying. Imagine "Q" as eyes with tears and "A" as a mouth.
Read more →You are given a chessboard of size n×n It is filled with numbers from 1 to n2
Read more →Little Petya loves presents. His mum bought him two strings of the same size for his birthday
Read more →There was an electronic store heist last night.
Read more →The prison of your city has n prisoners. As the prison can't accommodate all of them, the city mayor has decided to transfer c of the prisoners to a prison.
Read more →Petya is a big fan of mathematics, especially its part related to fractions.
Read more →Alice and Bob are decorating a Christmas Tree.
Read more →In the beginning of the new year Keivan decided to reverse his name. He doesn't like palindromes, so he changed Naviek to Navick.
Read more →A monster is chasing after Rick and Morty on another planet. They're so frightened that sometimes they scream
Read more →Kuro is living in a country called Uberland consisting of n towns, numbered from 1 to n and n−1 bidirectional roads connecting these towns
Read more →Elections are taking place in Berland. There are n candidates participating in the elections, numbered from 1 to n
Read more →Bomboslav likes to look out of the window in his room and watch lads outside playing famous shell game.
Read more →It seems that Borya is seriously sick. He is going visit n doctors to find out the exact diagnosis
Read more →During the break the schoolchildren, boys and girls, formed a queue of n people in the canteen.
Read more →As you may know, MemSQL has American offices in both San Francisco and Seattle
Read more →Sherlock is currently trying to catch a serial killer who kills a person each day.
Read more →After winning gold and silver in IOI 2014, Akshat and Malvika want to have some fun. Now they are playing a game on a grid made of n horizontal and m vertical.
Read more →Kirill plays a new computer game. He came to the potion store where he can buy any potion. Each potion is characterized by two integers
Read more →Mahmoud has n line segments, the i-th of them has length ai. Ehab challenged him to use exactly 3 line segments to form a non-degenerate triangle.
Read more →Valera had two bags of potatoes, the first of these bags contains x (x ≥ 1) potatoes.
Read more →While sailing on a boat, Inessa noticed a beautiful water lily flower above the lake's surface
Read more →One day three best friends Petya, Vasya and Tonya decided to form a team and take part in programming contests.
Read more →The given points are vertices of a plot of a piecewise function. The j-th piece of the function is the segment PjPj+1
Read more →k people want to split n candies between them. Each candy should be given to exactly one of them or be thrown away.
Read more →Little girl Tanya is learning how to decrease a number by one
Read more →Jon Snow now has to fight with White Walkers. He has n rangers, each of which has his own strength.
Read more →Young Timofey has a birthday today! He got kit of n cubes as a birthday present from his parents
Read more →Recently Luba learned about a special kind of numbers that she calls beautiful numbers.
Read more →Okabe needs bananas for one of his experiments for some strange reason. So he decides to go to the forest and cut banana trees.
Read more →Comrade Dujikov is busy choosing artists for Timofey's birthday and is recieving calls from Taymyr from Ilia-alpinist.
Read more →«Polygon» is a system which allows to create programming tasks in a simple and professional way.
Read more →Tavak and Seyyed are good friends. Seyyed is very funny and he told Tavak to solve the following problem instead of longest-path.
Read more →Bran and his older sister Arya are from the same house. Bran like candies so much, so Arya is going to give him some Candies
Read more →Young Timofey has a birthday today! He got kit of n cubes as a birthday present from his parents.
Read more →Katie, Kuro and Shiro are best friends. They have known each other since kindergarten
Read more →Polycarp has n coins, the value of coin is Polycarp wants to distribute all the coins between his pockets
Read more →There is a beautiful garden of stones in Innopolis.
Read more →After the lessons n groups of schoolchildren went outside and decided to visit Polycarpus to celebrate his birthday. We know that the i-th group consists
Read more →CodeChef recently revamped its practice page to make it easier for users to identify the next problems they should solve by introducing some new features.
Read more →Each student eagerly awaits the day he would pass the exams successfully
Read more →There are five people playing a game called "Generosity
Read more →You are given n chips on a number line. The i-th chip is placed at the integer coordinate
Read more →Imp is in a magic forest, where xorangles grow (wut?)
Read more →Mikhail walks on a 2D plane. He can go either up or right. You are given a sequence of Mikhail's moves. He thinks that this sequence is too long and he wants.
Read more →Aki is fond of numbers, especially those with trailing zeros
Read more →Where do odds begin, and where do they end? Where does hope emerge, and will they ever break?
Read more →There is a game called "Unique Bid Auction". You can read more about it here
Read more →As you could know there are no male planes nor female planes. However
Read more →There are n stones on the table in a row, each of them can be red, green or blue
Read more →A new e-mail service "Berlandesk" is going to be opened in Berland in the near future
Read more →In Berland, there are two types of coins, having denominations of 2and k burles
Read more →Mahmoud and Ehab play a game called the even-odd game. Ehab chooses his favorite integer n and then they take turns
Read more →There are n benches in the Berland Central park. It is known that a people are currently sitting on the bench
Read more →Three friends gathered to play a few games of chess together
Read more →Mishka got an integer array a of length n as a birthday present (what a surprise!).
Read more →You are given n sticks with positive integral length a1,a2
Read more →Katie, Kuro and Shiro are best friends. They have known each other since kindergarten
Read more →Polycarp has created his own training plan to prepare for the programming contests. He will train for n days, all days are numbered from 1 to n beginning
Read more →Dima has a hamsters farm. Soon N hamsters will grow up on it and Dima will sell them in a city nearby.
Read more →