
New Year and Old Property
The year 2015 is almost over. Limak is a little polar bear. He has recently learnt about the binary system. He noticed that the passing […]
The year 2015 is almost over. Limak is a little polar bear. He has recently learnt about the binary system. He noticed that the passing […]
Today is Wednesday, the third day of the week. What’s more interesting is that tomorrow is the last day of the year 2015. Limak is […]
They say “years are like dominoes, tumbling one after the other“. But would a year fit into a grid? I don’t think so. Limak is […]
Limak is a little polar bear. In the snow he found a scroll with the ancient prophecy. Limak doesn’t know any ancient languages and thus […]
Limak is a little polar bear. His parents told him to clean a house before the New Year’s Eve. Their house is a rectangular grid […]
Do you know the story about the three musketeers? Anyway, you must help them now. Richelimakieu is a cardinal in the city of Bearis. He […]
A tree is a connected undirected graph with n - 1 edges, where n denotes the number of vertices. Vertices are numbered 1 through n. Limak is a little polar bear. His bear family prepares a […]
Limak is a little polar bear. According to some old traditions, his bear family prepared a New Year cake. And Limak likes cakes. As you […]
Professor GukiZ makes a new robot. The robot are in the point with coordinates (x 1, y 1) and should go to the point (x 2, y 2). In a single step the robot […]
Once Max found an electronic calculator from his grandfather Dovlet’s chest. He noticed that the numbers were written with seven-segment indicators (https://en.wikipedia.org/wiki/Seven-segment_display). Max starts to […]
There are n pearls in a row. Let’s enumerate them with integers from 1 to n from the left to the right. The pearl number i has the type a i. Let’s call a sequence […]
The New Year holidays are over, but Resha doesn’t want to throw away the New Year tree. He invited his best friends Kerim and Gural […]
Professor GukiZ has two arrays of integers, a and b. Professor wants to make the sum of the elements in the array a s a as close as possible to the sum […]
You are given an array with n integers a i and m queries. Each query is described by two integers (l j, r j). Let’s define the function . The function is defined for only u ≤ v. For each […]
Calvin the robot lies in an infinite rectangular grid. Calvin’s source code contains a list of n commands, each either ‘U’, ‘R’, ‘D’, or ‘L’ — instructions to […]
Students in a class are making towers of blocks. Each student makes a (non-zero) tower by stacking pieces lengthwise on top of each other. n of the […]
Andrew and Jerry are playing a game with Harry as the scorekeeper. The game consists of three rounds. In each round, Andrew and Jerry draw […]
There are n students in a class working on group projects. The students will divide into groups (some students may be in groups alone), work on their […]
Define the simple skewness of a collection of numbers to be the collection’s mean minus its median. You are given a list of n (not necessarily distinct) integers. Find […]