
E-mail Addresses
One of the most important products of the R1 company is a popular @r1.com mail service. The R1 mailboxes receive and send millions of emails […]
One of the most important products of the R1 company is a popular @r1.com mail service. The R1 mailboxes receive and send millions of emails […]
The hero of the Cut the Rope game is a little monster named Om Nom. He loves candies. And what a coincidence! He also is […]
Om Nom really likes candies and doesn’t like spiders as they frequently steal candies. One day Om Nom fancied a walk in a park. Unfortunately, […]
During the loading of the game “Dungeons and Candies” you are required to get descriptions of k levels from the server. Each description is a map of […]
Have you ever played Pudding Monsters? In this task, a simplified one-dimensional model of this game is used. Imagine an infinite checkered stripe, the cells […]
Have you ever played Hanabi? If not, then you’ve got to try it out! This problem deals with a simplified version of the game. Overall, […]
Andrey needs one more problem to conduct a programming contest. He has n friends who are always willing to help. He can ask some of them to […]
When Adam gets a rooted tree (connected non-directed graph without cycles), he immediately starts coloring it. More formally, he assigns a color to each edge […]
Artem has an array of n positive integers. Artem decided to play with it. The game consists of n moves. Each move goes like this. Artem chooses some element […]
Gena doesn’t like geometry, so he asks you to solve this problem for him. A rectangle with sides parallel to coordinate axes contains n dots. Let’s consider […]
Alex enjoys performing magic tricks. He has a trick that requires a deck of n cards. He has m identical decks of n different cards each, which have been mixed together. […]
You are given a rectangular grid of lattice points from (0, 0) to (n, m) inclusive. You have to choose exactly 4 different points to build a polyline possibly with self-intersections […]
You have k pieces of laundry, each of which you want to wash, dry and fold. You are at a laundromat that has n 1 washing machines, n 2 drying machines and n 3 folding machines. […]
You are given three strings (s 1, s 2, s 3). For each integer l (1 ≤ l ≤ min(|s 1|, |s 2|, |s 3|) you need to find how many triples ( i 1, i 2, i 3) exist such that three strings s k[i k… i k + l - 1] (k = 1, 2, 3) are pairwise equal. Print all found […]
Andrew, Fedor and Alex are inventive guys. Now they invent the game with strings for two players. Given a group of n non-empty strings. During the game […]
Andrew plays a game called “Civilization”. Dima helps him. The game has n cities and m bidirectional roads. The cities are numbered from 1 to n. Between any pair of cities there […]
Serega loves fun. However, everyone has fun in the unique manner. Serega has fun by solving query problems. One day Fedor came up with such […]