task stringlengths 0 154k | __index_level_0__ int64 0 39.2k |
|---|---|
Title: Fedor and New Game
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
After you had helped George and Alex to move in the dorm, they went to help their friend Fedor play a new computer game «Call of Soldiers 3».
The game has (*m*<=+<=1) players and *n* types of soldiers in total. Play... | 3,600 |
Title: none
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Vasily has a deck of cards consisting of *n* cards. There is an integer on each of the cards, this integer is between 1 and 100<=000, inclusive. It is possible that some cards have the same integers on them.
Vasily decided to sor... | 3,601 |
Title: Spider Man
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Peter Parker wants to play a game with Dr. Octopus. The game is about cycles. Cycle is a sequence of vertices, such that first one is connected with the second, second is connected with third and so on, while the last one is... | 3,602 |
Title: String Theory
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Emuskald is an innovative musician and always tries to push the boundaries of music production. Now he has come up with an idea for a revolutionary musical instrument — a rectangular harp.
A rectangular harp is a rectang... | 3,603 |
Title: Little Elephant and Broken Sorting
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
The Little Elephant loves permutations of integers from 1 to *n* very much. But most of all he loves sorting them. To sort a permutation, the Little Elephant repeatedly swaps some elements. As a resul... | 3,604 |
Title: none
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Just to remind, girls in Arpa's land are really nice.
Mehrdad wants to invite some Hoses to the palace for a dancing party. Each Hos has some weight *w**i* and some beauty *b**i*. Also each Hos may have some friends. Hoses are di... | 3,605 |
Title: Hanger
Time Limit: 4 seconds
Memory Limit: 256 megabytes
Problem Description:
In one very large and very respectable company there is a cloakroom with a coat hanger. It is represented by *n* hooks, positioned in a row. The hooks are numbered with positive integers from 1 to *n* from the left to the right.
Th... | 3,606 |
Title: Bubble Sort Graph
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Iahub recently has learned Bubble Sort, an algorithm that is used to sort a permutation with *n* elements *a*1, *a*2, ..., *a**n* in ascending order. He is bored of this so simple algorithm, so he invents his own grap... | 3,607 |
Title: Command Line Arguments
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
The problem describes the properties of a command line. The description somehow resembles the one you usually see in real operating systems. However, there are differences in the behavior. Please make sure you've... | 3,608 |
Title: Paper task
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Alex was programming while Valentina (his toddler daughter) got there and started asking many questions about the round brackets (or parenthesis) in the code. He explained her a bit and when she got it he gave her a task in ... | 3,609 |
Title: Lucky Queries
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Petya loves lucky numbers very much. Everybody knows that lucky numbers are positive integers whose decimal record contains only the lucky digits 4 and 7. For example, numbers 47, 744, 4 are lucky and 5, 17, 467 are not.
... | 3,610 |
Title: none
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Polycarp's workday lasts exactly $n$ minutes. He loves chocolate bars and can eat one bar in one minute. Today Polycarp has $k$ bars at the beginning of the workday.
In some minutes of the workday Polycarp has important things to... | 3,611 |
Title: Cubes for Masha
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Absent-minded Masha got set of *n* cubes for her birthday.
At each of 6 faces of each cube, there is exactly one digit from 0 to 9. Masha became interested what is the largest natural *x* such she can make using her ne... | 3,612 |
Title: Autocomplete
Time Limit: 2 seconds
Memory Limit: 256 megabytes
Problem Description:
Autocomplete is a program function that enables inputting the text (in editors, command line shells, browsers etc.) completing the text by its inputted part. Vasya is busy working on a new browser called 'BERowser'. He happens... | 3,613 |
Title: none
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Drazil created a following problem about putting 1<=×<=2 tiles into an *n*<=×<=*m* grid:
"There is a grid with some cells that are empty and some cells that are occupied. You should use 1<=×<=2 tiles to cover all empty cells and ... | 3,614 |
Title: Mobile Communications
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
A sum of *p* rubles is charged from Arkady's mobile phone account every day in the morning. Among the following *m* days, there are *n* days when Arkady will top up the account: in the day *d**i* he will deposit *... | 3,615 |
Title: Anagram Search
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
A string *t* is called an anagram of the string *s*, if it is possible to rearrange letters in *t* so that it is identical to the string *s*. For example, the string "aab" is an anagram of the string "aba" and the string... | 3,616 |
Title: Restoring Painting
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Vasya works as a watchman in the gallery. Unfortunately, one of the most expensive paintings was stolen while he was on duty. He doesn't want to be fired, so he has to quickly restore the painting. He remembers some ... | 3,617 |
Title: IQ test
Time Limit: 2 seconds
Memory Limit: 256 megabytes
Problem Description:
Bob is preparing to pass IQ test. The most frequent task in this test is to find out which one of the given *n* numbers differs from the others. Bob observed that one number usually differs from the others in evenness. Help Bob — t... | 3,618 |
Title: Quest
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Polycarp is making a quest for his friends. He has already made *n* tasks, for each task the boy evaluated how interesting it is as an integer *q**i*, and the time *t**i* in minutes needed to complete the task.
An interesting f... | 3,619 |
Title: University Classes
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
There are *n* student groups at the university. During the study day, each group can take no more than 7 classes. Seven time slots numbered from 1 to 7 are allocated for the classes.
The schedule on Monday is known ... | 3,620 |
Title: Sereja and Swaps
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
As usual, Sereja has array *a*, its elements are integers: *a*[1],<=*a*[2],<=...,<=*a*[*n*]. Let's introduce notation:
A swap operation is the following sequence of actions:
- choose two indexes *i*,<=*j* (*i*<=≠<=*... | 3,621 |
Title: none
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
There is a right triangle with legs of length *a* and *b*. Your task is to determine whether it is possible to locate the triangle on the plane in such a way that none of its sides is parallel to the coordinate axes. All the verti... | 3,622 |
Title: Domino
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Valera has got *n* domino pieces in a row. Each piece consists of two halves — the upper one and the lower one. Each of the halves contains a number from 1 to 6. Valera loves even integers very much, so he wants the sum of the n... | 3,623 |
Title: none
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
A classroom in a school has six rows with 3 desks in each row. Two people can use the same desk: one sitting on the left and one sitting on the right.
Some places are already occupied, and some places are vacant. Petya has just ... | 3,624 |
Title: Heidi and Library (hard)
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
The good times at Heidi's library are over. Marmots finally got their internet connections and stopped coming to the library altogether. Not only that, but the bookstore has begun charging extortionate prices f... | 3,625 |
Title: none
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
As a tradition, every year before IOI all the members of Natalia Fan Club are invited to Malek Dance Club to have a fun night together. Malek Dance Club has 2*n* members and coincidentally Natalia Fan Club also has 2*n* members. E... | 3,626 |
Title: Longtail Hedgehog
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
This Christmas Santa gave Masha a magic picture and a pencil. The picture consists of *n* points connected by *m* segments (they might cross in any way, that doesn't matter). No two segments connect the same pair of p... | 3,627 |
Title: Palindrome Partition
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Given a string *s*, find the number of ways to split *s* to substrings such that if there are *k* substrings (*p*1,<=*p*2,<=*p*3,<=...,<=*p**k*) in partition, then *p**i*<==<=*p**k*<=-<=*i*<=+<=1 for all *i* (1<=≤<... | 3,628 |
Title: Patrick and Shopping
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Today Patrick waits for a visit from his friend Spongebob. To prepare for the visit, Patrick needs to buy some goodies in two stores located near his house. There is a *d*1 meter long road between his house and the... | 3,629 |
Title: none
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Little Petya likes permutations a lot. Recently his mom has presented him permutation *q*1,<=*q*2,<=...,<=*q**n* of length *n*.
A permutation *a* of length *n* is a sequence of integers *a*1,<=*a*2,<=...,<=*a**n* (1<=≤<=*a**i*<=≤... | 3,630 |
Title: Ants
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
There is a tree with $n$ vertices. There are also $m$ ants living on it. Each ant has its own color. The $i$-th ant has two favorite pairs of vertices: ($a_i, b_i$) and ($c_i, d_i$). You need to tell if it is possible to paint the... | 3,631 |
Title: Hulk
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Dr. Bruce Banner hates his enemies (like others don't). As we all know, he can barely talk when he turns into the incredible Hulk. That's why he asked you to help him to express his feelings.
Hulk likes the Inception so much, and... | 3,632 |
Title: none
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
This is an interactive problem. In the output section below you will see the information about flushing the output.
On Sunday Leha the hacker took Nura from the house where she lives and went with her to one of the most luxurious... | 3,633 |
Title: Password
Time Limit: 1 seconds
Memory Limit: 256 megabytes
Problem Description:
Finally Fox Ciel arrived in front of her castle!
She have to type a password to enter her castle. An input device attached to her castle is a bit unusual.
The input device is a 1<=×<=*n* rectangle divided into *n* square panels.... | 3,634 |
Title: IT Restaurants
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Сity N. has a huge problem with roads, food and IT-infrastructure. In total the city has *n* junctions, some pairs of them are connected by bidirectional roads. The road network consists of *n*<=-<=1 roads, you can get f... | 3,635 |
Title: Twisted Circuit
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Input Specification:
The input consists of four lines, each line containing a single digit 0 or 1.
Output Specification:
Output a single digit, 0 or 1.
Demo Input:
['0\n1\n1\n0\n']
Demo Output:
['0\n']
Note:
none | 3,636 |
Title: Fox and Card Game
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Fox Ciel is playing a card game with her friend Fox Jiro. There are *n* piles of cards on the table. And there is a positive integer on each card.
The players take turns and Ciel takes the first turn. In Ciel's turn ... | 3,637 |
Title: Asphalting Roads
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
City X consists of *n* vertical and *n* horizontal infinite roads, forming *n*<=×<=*n* intersections. Roads (both vertical and horizontal) are numbered from 1 to *n*, and the intersections are indicated by the numbers ... | 3,638 |
Title: Cutting a Fence
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Vasya the carpenter has an estate that is separated from the wood by a fence. The fence consists of *n* planks put in a line. The fence is not closed in a circle. The planks are numbered from left to right from 1 to *n*... | 3,639 |
Title: Good Matrix Elements
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
The Smart Beaver from ABBYY got hooked on square matrices. Now he is busy studying an *n*<=×<=*n* size matrix, where *n* is odd. The Smart Beaver considers the following matrix elements good:
- Elements of the ... | 3,640 |
Title: Minimum and Maximum
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
This is an interactive problem. You have to use flush operation right after printing each line. For example, in C++ you should use function fflush(stdout), in Java — System.out.flush(), in Pascal — flush(output) and... | 3,641 |
Title: Godsend
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Leha somehow found an array consisting of *n* integers. Looking at it, he came up with a task. Two players play the game on the array. Players move one by one. The first player can choose for his move a subsegment of non-zero l... | 3,642 |
Title: Flag
Time Limit: 2 seconds
Memory Limit: 64 megabytes
Problem Description:
According to a new ISO standard, a flag of every country should have a chequered field *n*<=×<=*m*, each square should be of one of 10 colours, and the flag should be «striped»: each horizontal row of the flag should contain squares of... | 3,643 |
Title: none
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Jeff got 2*n* real numbers *a*1,<=*a*2,<=...,<=*a*2*n* as a birthday present. The boy hates non-integer numbers, so he decided to slightly "adjust" the numbers he's got. Namely, Jeff consecutively executes *n* operations, each of ... | 3,644 |
Title: none
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
You have a rectangular *n*<=×<=*m*-cell board. Some cells are already painted some of *k* colors. You need to paint each uncolored cell one of the *k* colors so that any path from the upper left square to the lower right one doesn... | 3,645 |
Title: Olympic Games
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
This problem was deleted from the contest, because it was used previously at another competition.
Demo Input:
['1 1\n1 2 100\n']
Demo Output:
['6\n']
Note:
none | 3,646 |
Title: Vanya and Cards
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Vanya loves playing. He even has a special set of cards to play with. Each card has a single integer. The number on the card can be positive, negative and can even be equal to zero. The only limit is, the number on each... | 3,647 |
Title: Fox and Number Game
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Fox Ciel is playing a game with numbers now.
Ciel has *n* positive integers: *x*1, *x*2, ..., *x**n*. She can do the following operation as many times as needed: select two different indexes *i* and *j* such that ... | 3,648 |
Title: Connecting Vertices
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
There are *n* points marked on the plane. The points are situated in such a way that they form a regular polygon (marked points are its vertices, and they are numbered in counter-clockwise order). You can draw *n*<=... | 3,649 |
Title: Lucky Numbers
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
The numbers of all offices in the new building of the Tax Office of IT City will have lucky numbers.
Lucky number is a number that consists of digits 7 and 8 only. Find the maximum number of offices in the new building o... | 3,650 |
Title: The Fibonacci Segment
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
You have array *a*1,<=*a*2,<=...,<=*a**n*. Segment [*l*,<=*r*] (1<=≤<=*l*<=≤<=*r*<=≤<=*n*) is good if *a**i*<==<=*a**i*<=-<=1<=+<=*a**i*<=-<=2, for all *i* (*l*<=+<=2<=≤<=*i*<=≤<=*r*).
Let's define *len*([*l*,<=*... | 3,651 |
Title: none
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
You must have heard of the two brothers dreaming of ruling the world. With all their previous plans failed, this time they decided to cooperate with each other in order to rule the world.
As you know there are *n* countries in t... | 3,652 |
Title: Drazil and Date
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Someday, Drazil wanted to go on date with Varda. Drazil and Varda live on Cartesian plane. Drazil's home is located in point (0,<=0) and Varda's home is located in point (*a*,<=*b*). In each step, he can move in a unit ... | 3,653 |
Title: Listening to Music
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Please note that the memory limit differs from the standard.
You really love to listen to music. During the each of next *s* days you will listen to exactly *m* songs from the playlist that consists of exactly *n* s... | 3,654 |
Title: none
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Mr. Kitayuta's garden is planted with *n* bamboos. (Bamboos are tall, fast-growing tropical plants with hollow stems.) At the moment, the height of the *i*-th bamboo is *h**i* meters, and it grows *a**i* meters at the end of each ... | 3,655 |
Title: Berland Miners
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
The biggest gold mine in Berland consists of *n* caves, connected by *n*<=-<=1 transitions. The entrance to the mine leads to the cave number 1, it is possible to go from it to any remaining cave of the mine by moving al... | 3,656 |
Title: A Map of the Cat
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
If you have ever interacted with a cat, you have probably noticed that they are quite particular about how to pet them. Here is an approximate map of a normal cat.
However, some cats won't tolerate this nonsense from ... | 3,657 |
Title: none
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
A positive integer is called a 2-3-integer, if it is equal to 2*x*·3*y* for some non-negative integers *x* and *y*. In other words, these integers are such integers that only have 2 and 3 among their prime divisors. For example, i... | 3,658 |
Title: none
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Some company is going to hold a fair in Byteland. There are $n$ towns in Byteland and $m$ two-way roads between towns. Of course, you can reach any town from any other town using roads.
There are $k$ types of goods produced in By... | 3,659 |
Title: Professor's task
Time Limit: 1 seconds
Memory Limit: 256 megabytes
Problem Description:
Once a walrus professor Plato asked his programming students to perform the following practical task.
The students had to implement such a data structure that would support a convex hull on some set of points *S*. The in... | 3,660 |
Title: Shop
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Vasya plays one very well-known and extremely popular MMORPG game. His game character has *k* skill; currently the *i*-th of them equals to *a**i*. Also this game has a common rating table in which the participants are ranked acco... | 3,661 |
Title: Chain Reaction
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
There are *n* beacons located at distinct positions on a number line. The *i*-th beacon has position *a**i* and power level *b**i*. When the *i*-th beacon is activated, it destroys all beacons to its left (direction of d... | 3,662 |
Title: Cats Transport
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Zxr960115 is owner of a large farm. He feeds *m* cute cats and employs *p* feeders. There's a straight road across the farm and *n* hills along the road, numbered from 1 to *n* from left to right. The distance between hi... | 3,663 |
Title: Bamboo Partition
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Vladimir wants to modernize partitions in his office. To make the office more comfortable he decided to remove a partition and plant several bamboos in a row. He thinks it would be nice if there are *n* bamboos in a ro... | 3,664 |
Title: Professor GukiZ and Two Arrays
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
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 of the elements in the array b *s**b*. So he want... | 3,665 |
Title: Danil and a Part-time Job
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Danil decided to earn some money, so he had found a part-time job. The interview have went well, so now he is a light switcher.
Danil works in a rooted tree (undirected connected acyclic graph) with *n* verti... | 3,666 |
Title: Legacy
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Rick and his co-workers have made a new radioactive formula and a lot of bad guys are after them. So Rick wants to give his legacy to Morty before bad guys catch them.
There are *n* planets in their universe numbered from 1 to... | 3,667 |
Title: Hit the Lottery
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Allen has a LOT of money. He has $n$ dollars in the bank. For security reasons, he wants to withdraw it in cash (we will not disclose the reasons here). The denominations for dollar bills are $1$, $5$, $10$, $20$, $100$... | 3,668 |
Title: Chemistry in Berland
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Igor is a post-graduate student of chemistry faculty in Berland State University (BerSU). He needs to conduct a complicated experiment to write his thesis, but laboratory of BerSU doesn't contain all the materials ... | 3,669 |
Title: Make Palindrome
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
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.
Yo... | 3,670 |
Title: Mishap in Club
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Polycarpus just has been out of luck lately! As soon as he found a job in the "Binary Cat" cafe, the club got burgled. All ice-cream was stolen.
On the burglary night Polycarpus kept a careful record of all club visitor... | 3,671 |
Title: Multithreading
Time Limit: 2 seconds
Memory Limit: 256 megabytes
Problem Description:
You are given the following concurrent program. There are *N* processes and the *i*-th process has the following pseudocode:
Here *y* is a shared variable. Everything else is local for the process. All actions on a given r... | 3,672 |
Title: Arrangement
Time Limit: 2 seconds
Memory Limit: 256 megabytes
Problem Description:
In the year 2500 the annual graduation ceremony in the German University in Cairo (GUC) has run smoothly for almost 500 years so far.
The most important part of the ceremony is related to the arrangement of the professors in t... | 3,673 |
Title: DZY Loves FFT
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
DZY loves Fast Fourier Transformation, and he enjoys using it.
Fast Fourier Transformation is an algorithm used to calculate convolution. Specifically, if *a*, *b* and *c* are sequences with length *n*, which are indexed... | 3,674 |
Title: Dima and Text Messages
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Seryozha has a very changeable character. This time he refused to leave the room to Dima and his girlfriend (her hame is Inna, by the way). However, the two lovebirds can always find a way to communicate. Today t... | 3,675 |
Title: Magical Array
Time Limit: 2 seconds
Memory Limit: 256 megabytes
Problem Description:
Valery is very interested in magic. Magic attracts him so much that he sees it everywhere. He explains any strange and weird phenomenon through intervention of supernatural forces. But who would have thought that even in a re... | 3,676 |
Title: Graph And Its Complement
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Given three numbers $n, a, b$. You need to find an adjacency matrix of such an undirected graph that the number of components in it is equal to $a$, and the number of components in its complement is $b$. The ma... | 3,677 |
Title: Curriculum Vitae
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Hideo 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.
During all his career Hideo has produced *n* g... | 3,678 |
Title: Dima and Guards
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Nothing has changed since the last round. Dima and Inna still love each other and want to be together. They've made a deal with Seryozha and now they need to make a deal with the dorm guards...
There are four guardpost... | 3,679 |
Title: none
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
You are an adventurer currently journeying inside an evil temple. After defeating a couple of weak zombies, you arrived at a square room consisting of tiles forming an *n*<=×<=*n* grid. The rows are numbered 1 through *n* from top... | 3,680 |
Title: none
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
A newspaper is published in Walrusland. Its heading is *s*1, it consists of lowercase Latin letters. Fangy the little walrus wants to buy several such newspapers, cut out their headings, glue them one to another in order to get on... | 3,681 |
Title: Movie Critics
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
A film festival is coming up in the city N. The festival will last for exactly *n* days and each day will have a premiere of exactly one film. Each film has a genre — an integer from 1 to *k*.
On the *i*-th day the festi... | 3,682 |
Title: none
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
The famous global economic crisis is approaching rapidly, so the states of Berman, Berance and Bertaly formed an alliance and allowed the residents of all member states to freely pass through the territory of any of them. In addit... | 3,683 |
Title: Plumber
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Little John aspires to become a plumber! Today he has drawn a grid consisting of *n* rows and *m* columns, consisting of *n*<=×<=*m* square cells.
In each cell he will draw a pipe segment. He can only draw four types of segmen... | 3,684 |
Title: Game
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
There 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.
The game is played on a... | 3,685 |
Title: Glad to see you!
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
This is an interactive problem. In the output section below you will see the information about flushing the output.
On Sunday Leha the hacker took Nura from the house where she lives and went with her to one of the mo... | 3,686 |
Title: Name That Tune
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
It turns out that you are a great fan of rock band AC/PE. Peter learned that and started the following game: he plays the first song of the list of *n* songs of the group, and you have to find out the name of the song. A... | 3,687 |
Title: Mike and Frog
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Mike has a frog and a flower. His frog is named Xaniar and his flower is named Abol. Initially(at time 0), height of Xaniar is *h*1 and height of Abol is *h*2. Each second, Mike waters Abol and Xaniar.
So, if height of X... | 3,688 |
Title: none
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Vasya plays a computer game with ninjas. At this stage Vasya's ninja should get out of a deep canyon.
The canyon consists of two vertical parallel walls, their height is *n* meters. Let's imagine that we split these walls into 1 ... | 3,689 |
Title: Hercule Poirot Problem
Time Limit: 2 seconds
Memory Limit: 256 megabytes
Problem Description:
Today you are to solve the problem even the famous Hercule Poirot can't cope with! That's why this crime has not yet been solved and this story was never included in Agatha Christie's detective story books.
You are... | 3,690 |
Title: none
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Little penguin Polo likes permutations. But most of all he likes permutations of integers from 0 to *n*, inclusive.
For permutation *p*<==<=*p*0,<=*p*1,<=...,<=*p**n*, Polo has defined its beauty — number .
Expression means app... | 3,691 |
Title: none
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Gerald plays the following game. He has a checkered field of size *n*<=×<=*n* cells, where *m* various cells are banned. Before the game, he has to put a few chips on some border (but not corner) board cells. Then for *n*<=-<=1 mi... | 3,692 |
Title: none
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Let's introduce a number system which is based on a roman digits. There are digits I, V, X, L which correspond to the numbers $1$, $5$, $10$ and $50$ respectively. The use of other roman digits is not allowed.
Numbers in this sys... | 3,693 |
Title: none
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Fox Ciel is playing a card game with her friend Jiro.
Jiro has *n* cards, each one has two attributes: *position* (Attack or Defense) and *strength*. Fox Ciel has *m* cards, each one has these two attributes too. It's known that ... | 3,694 |
Title: none
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Little boy Igor wants to become a traveller. At first, he decided to visit all the cities of his motherland — Uzhlyandia.
It is widely known that Uzhlyandia has *n* cities connected with *m* bidirectional roads. Also, there are n... | 3,695 |
Title: none
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Andrewid the Android is a galaxy-famous detective. He is now investigating the case of vandalism at the exhibition of contemporary art.
The main exhibit is a construction of *n* matryoshka dolls that can be nested one into anothe... | 3,696 |
Title: Bear and Bowling
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Limak is an old brown bear. He often goes bowling with his friends. Today he feels really good and tries to beat his own record!
For rolling a ball one gets a score — an integer (maybe negative) number of points. Scor... | 3,697 |
Title: Clear The Matrix
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
You are given a matrix *f* with 4 rows and *n* columns. Each element of the matrix is either an asterisk (*) or a dot (.).
You may perform the following operation arbitrary number of times: choose a square submatrix o... | 3,698 |
Title: none
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Appleman and Toastman play a game. Initially Appleman gives one group of *n* numbers to the Toastman, then they start to complete the following tasks:
- Each time Toastman gets a group of numbers, he sums up all the numbers and ... | 3,699 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.