task stringlengths 0 154k | __index_level_0__ int64 0 39.2k |
|---|---|
Title: Rational Resistance
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Mad scientist Mike is building a time machine in his spare time. To finish the work, he needs a resistor with a certain resistance value.
However, all Mike has is lots of identical resistors with unit resistance *R... | 1,500 |
Title: Moore's Law
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
The city administration of IT City decided to fix up a symbol of scientific and technical progress in the city's main square, namely an indicator board that shows the effect of Moore's law in real time.
Moore's law is the ... | 1,501 |
Title: Contact
Time Limit: 3 seconds
Memory Limit: 256 megabytes
Problem Description:
Little Petya is preparing for the first contact with aliens. He knows that alien spaceships have shapes of non-degenerate triangles and there will be exactly 4 ships. Landing platform for a ship can be made of 3 special columns loc... | 1,502 |
Title: Sagheer and Nubian Market
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
On his trip to Luxor and Aswan, Sagheer went to a Nubian market to buy some souvenirs for his friends and relatives. The market has some strange rules. It contains *n* different items numbered from 1 to *n*. T... | 1,503 |
Title: Find Color
Time Limit: 2 seconds
Memory Limit: 256 megabytes
Problem Description:
Not so long ago as a result of combat operations the main Berland place of interest β the magic clock β was damaged. The cannon's balls made several holes in the clock, that's why the residents are concerned about the repair. Th... | 1,504 |
Title: none
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Rick and Morty are playing their own version of Berzerk (which has nothing in common with the famous Berzerk game). This game needs a huge space, so they play it with a computer.
In this game there are *n* objects numbered from 1... | 1,505 |
Title: Ithea Plays With Chtholly
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
This is an interactive problem. Refer to the Interaction section below for better understanding.
Ithea and Chtholly want to play a game in order to determine who can use the kitchen tonight.
Initially, Ith... | 1,506 |
Title: Ship's Shortest Path
Time Limit: 2 seconds
Memory Limit: 256 megabytes
Problem Description:
You have got a new job, and it's very interesting, you are a ship captain. Your first task is to move your ship from one point to another point, and for sure you want to move it at the minimum cost.
And it's well know... | 1,507 |
Title: Flying Saucer Segments
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
An expedition group flew from planet ACM-1 to Earth in order to study the bipedal species (its representatives don't even have antennas on their heads!).
The flying saucer, on which the brave pioneers set off, c... | 1,508 |
Title: Fafa and Array
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Fafa has an array *A* of *n* positive integers, the function *f*(*A*) is defined as . He wants to do *q* queries of two types:
- 1<=*l*<=*r*<=*x* β find the maximum possible value of *f*(*A*), if *x* is to be added to ... | 1,509 |
Title: Cycles
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
John Doe started thinking about graphs. After some thought he decided that he wants to paint an undirected graph, containing exactly *k* cycles of length 3.
A cycle of length 3 is an unordered group of three distinct graph ver... | 1,510 |
Title: none
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Asterix, Obelix and their temporary buddies Suffix and Prefix has finally found the Harmony temple. However, its doors were firmly locked and even Obelix had no luck opening them.
A little later they found a string *s*, carved on... | 1,511 |
Title: Kalevitch and Chess
Time Limit: 2 seconds
Memory Limit: 64 megabytes
Problem Description:
A famous Berland's painter Kalevitch likes to shock the public. One of his last obsessions is chess. For more than a thousand years people have been playing this old game on uninteresting, monotonous boards. Kalevitch de... | 1,512 |
Title: none
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Treeland is a country in which there are *n* towns connected by *n*<=-<=1 two-way road such that it's possible to get from any town to any other town.
In Treeland there are 2*k* universities which are located in different towns.... | 1,513 |
Title: Can Bash Save the Day?
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Whoa! You did a great job helping Team Rocket who managed to capture all the Pokemons sent by Bash. Meowth, part of Team Rocket, having already mastered the human language, now wants to become a master in program... | 1,514 |
Title: none
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Consider a sequence [*a*1,<=*a*2,<=... ,<=*a**n*]. Define its prefix product sequence .
Now given *n*, find a permutation of [1,<=2,<=...,<=*n*], such that its prefix product sequence is a permutation of [0,<=1,<=...,<=*n*<=-<=1]... | 1,515 |
Title: none
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
DZY has a sequence *a*, consisting of *n* integers.
We'll call a sequence *a**i*,<=*a**i*<=+<=1,<=...,<=*a**j* (1<=β€<=*i*<=β€<=*j*<=β€<=*n*) a subsegment of the sequence *a*. The value (*j*<=-<=*i*<=+<=1) denotes the length of the ... | 1,516 |
Title: none
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Limak is an old brown bear. He often plays poker with his friends. Today they went to a casino. There are *n* players (including Limak himself) and right now all of them have bids on the table. *i*-th of them has bid with size *a*... | 1,517 |
Title: Bear and Chase
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Bearland has *n* cities, numbered 1 through *n*. There are *m* bidirectional roads. The *i*-th road connects two distinct cities *a**i* and *b**i*. No two roads connect the same pair of cities. It's possible to get from ... | 1,518 |
Title: Tree and Array
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
User ainta likes trees. This time he is going to make an undirected tree with *n* vertices numbered by integers from 1 to *n*. The tree is weighted, so each edge of the tree will have some integer weight.
Also he has an... | 1,519 |
Title: Strange town
Time Limit: 2 seconds
Memory Limit: 256 megabytes
Problem Description:
Volodya has recently visited a very odd town. There are *N* tourist attractions in the town and every two of them are connected by a bidirectional road. Each road has some travel price (natural number) assigned to it and all p... | 1,520 |
Title: The Child and Toy
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
On Children's Day, the child got a toy from Delayyy as a present. However, the child is so naughty that he can't wait to destroy the toy.
The toy consists of *n* parts and *m* ropes. Each rope links two parts, but ev... | 1,521 |
Title: none
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Consider a regular Codeforces round consisting of three problems that uses dynamic scoring.
You are given an almost final scoreboard. For each participant (including yourself), the time of the accepted submission for each of the ... | 1,522 |
Title: Burning Midnight Oil
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
One day a highly important task was commissioned to Vasya β writing a program in a night. The program consists of *n* lines of code. Vasya is already exhausted, so he works like that: first he writes *v* lines of c... | 1,523 |
Title: String Set Queries
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
You should process *m* queries over a set *D* of strings. Each query is one of three kinds:
1. Add a string *s* to the set *D*. It is guaranteed that the string *s* was not added before. 1. Delete a string *s* fro... | 1,524 |
Title: Power Tree
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Genos and Saitama went shopping for Christmas trees. However, a different type of tree caught their attention, the exalted Power Tree.
A Power Tree starts out as a single root vertex indexed 1. A Power Tree grows through a... | 1,525 |
Title: none
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Vitya has learned that the answer for The Ultimate Question of Life, the Universe, and Everything is not the integer 54 42, but an increasing integer sequence $a_1, \ldots, a_n$. In order to not reveal the secret earlier than need... | 1,526 |
Title: Little Artem and 2-SAT
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Little Artem is a very smart programmer. He knows many different difficult algorithms. Recently he has mastered in 2-SAT one.
In computer science, 2-satisfiability (abbreviated as 2-SAT) is the special case of t... | 1,527 |
Title: Palindromes in a Tree
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
You are given a tree (a connected acyclic undirected graph) of *n* vertices. Vertices are numbered from 1 to *n* and each vertex is assigned a character from a to t.
A path in the tree is said to be palindromic i... | 1,528 |
Title: The Child and Sequence
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
At the children's day, the child came to Picks's house, and messed his house up. Picks was angry at him. A lot of important things were lost, in particular the favorite sequence of Picks.
Fortunately, Picks reme... | 1,529 |
Title: E-reader Display
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
After years of hard work scientists invented an absolutely new e-reader display. The new display has a larger resolution, consumes less energy and its production is cheaper. And besides, one can bend it. The only incon... | 1,530 |
Title: Rusty String
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Grigory loves strings. Recently he found a metal strip on a loft. The strip had length *n* and consisted of letters "V" and "K". Unfortunately, rust has eaten some of the letters so that it's now impossible to understand w... | 1,531 |
Title: Counting Arrays
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
You are given two positive integer numbers *x* and *y*. An array *F* is called an *y*-factorization of *x* iff the following conditions are met:
- There are *y* elements in *F*, and all of them are integer numbers; - ... | 1,532 |
Title: none
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Vera adores poems. All the poems Vera knows are divided into quatrains (groups of four lines) and in each quatrain some lines contain rhymes.
Let's consider that all lines in the poems consist of lowercase Latin letters (without ... | 1,533 |
Title: Tell Your World
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Connect the countless points with lines, till we reach the faraway yonder.
There are *n* points on a coordinate plane, the *i*-th of which being (*i*,<=*y**i*).
Determine whether it's possible to draw two parallel and... | 1,534 |
Title: Petya and His Friends
Time Limit: 2 seconds
Memory Limit: 256 megabytes
Problem Description:
Little Petya has a birthday soon. Due this wonderful event, Petya's friends decided to give him sweets. The total number of Petya's friends equals to *n*.
Let us remind you the definition of the greatest common divis... | 1,535 |
Title: Looking for Owls
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Emperor Palpatine loves owls very much. The emperor has some blueprints with the new Death Star, the blueprints contain *n* distinct segments and *m* distinct circles. We will consider the segments indexed from 1 to *n... | 1,536 |
Title: Parade
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Very soon there will be a parade of victory over alien invaders in Berland. Unfortunately, all soldiers died in the war and now the army consists of entirely new recruits, many of whom do not even know from which leg they should... | 1,537 |
Title: Chocolate
Time Limit: 2 seconds
Memory Limit: 256 megabytes
Problem Description:
Bob has a rectangular chocolate bar of the size *W*<=Γ<=*H*. He introduced a cartesian coordinate system so that the point (0,<=0) corresponds to the lower-left corner of the bar, and the point (*W*,<=*H*) corresponds to the uppe... | 1,538 |
Title: Shark
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
For long time scientists study the behavior of sharks. Sharks, as many other species, alternate short movements in a certain location and long movements between locations.
Max is a young biologist. For $n$ days he watched a spec... | 1,539 |
Title: Empire Strikes Back
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
In a far away galaxy there is war again. The treacherous Republic made *k* precision strikes of power *a**i* on the Empire possessions. To cope with the republican threat, the Supreme Council decided to deal a decis... | 1,540 |
Title: Little Elephant and Cards
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
The Little Elephant loves to play with color cards.
He has *n* cards, each has exactly two colors (the color of the front side and the color of the back side). Initially, all the cards lay on the table with t... | 1,541 |
Title: Flea
Time Limit: 2 seconds
Memory Limit: 256 megabytes
Problem Description:
It is known that fleas in Berland can jump only vertically and horizontally, and the length of the jump is always equal to *s* centimeters. A flea has found herself at the center of some cell of the checked board of the size *n*<=Γ<=*... | 1,542 |
Title: none
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Yasin has an array *a* containing *n* integers. Yasin is a 5 year old, so he loves ultimate weird things.
Yasin denotes weirdness of an array as maximum *gcd*(*a**i*,<=<=*a**j*) value among all 1<=β€<=*i*<=<<=*j*<=β€<=*n*. For *... | 1,543 |
Title: DZY Loves Physics
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
DZY loves Physics, and he enjoys calculating density.
Almost everything has density, even a graph. We define the density of a non-directed graph (nodes and edges of the graph have some values) as follows:
Once DZY ... | 1,544 |
Title: Sagheer and Apple Tree
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Sagheer is playing a game with his best friend Soliman. He brought a tree with *n* nodes numbered from 1 to *n* and rooted at node 1. The *i*-th node has *a**i* apples. This tree has a special property: the lengt... | 1,545 |
Title: Turn the Rectangles
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
There are $n$ rectangles in a row. You can either turn each rectangle by $90$ degrees or leave it as it is. If you turn a rectangle, its width will be height, and its height will be width. Notice that you can turn a... | 1,546 |
Title: none
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Everyone knows that DNA strands consist of nucleotides. There are four types of nucleotides: "A", "T", "G", "C". A DNA strand is a sequence of nucleotides. Scientists decided to track evolution of a rare species, which DNA strand ... | 1,547 |
Title: Gleb And Pizza
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Gleb ordered pizza home. When the courier delivered the pizza, he was very upset, because several pieces of sausage lay on the crust, and he does not really like the crust.
The pizza is a circle of radius *r* and center... | 1,548 |
Title: MUH and Lots and Lots of Segments
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Polar bears Menshykov and Uslada from the zoo of St. Petersburg and elephant Horace from the zoo of Kiev decided to do some painting. As they were trying to create their first masterpiece, they made a ... | 1,549 |
Title: Vacations
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Vasya has *n* days of vacations! So he decided to improve his IT skills and do sport. Vasya knows the following information about each of this *n* days: whether that gym opened and whether a contest was carried out in the Int... | 1,550 |
Title: Devu, the Dumb Guy
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Devu is a dumb guy, his learning curve is very slow. You are supposed to teach him *n* subjects, the *i**th* subject has *c**i* chapters. When you teach him, you are supposed to teach all the chapters of a subject co... | 1,551 |
Title: none
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
In the year of $30XX$ participants of some world programming championship live in a single large hotel. The hotel has $n$ floors. Each floor has $m$ sections with a single corridor connecting all of them. The sections are enumerat... | 1,552 |
Title: Restructuring Company
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Even the most successful company can go through a crisis period when you have to make a hard decision β to restructure, discard and merge departments, fire employees and do other unpleasant stuff. Let's consider t... | 1,553 |
Title: Arpaβs abnormal DNA and Mehrdadβs deep interest
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
All of us know that girls in Arpaβs land are... ok, youβve got the idea :D
Anyone knows that Arpa isn't a normal man, he is ... well, sorry, I can't explain it more. Mehrdad is intereste... | 1,554 |
Title: Willem, Chtholly and Seniorious
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
β Willem...
β What's the matter?
β It seems that there's something wrong with Seniorious...
β I'll have a look...
Seniorious is made by linking special talismans in particular order.
After over 50... | 1,555 |
Title: Beautiful numbers
Time Limit: 4 seconds
Memory Limit: 256 megabytes
Problem Description:
Volodya is an odd boy and his taste is strange as well. It seems to him that a positive integer number is beautiful if and only if it is divisible by each of its nonzero digits. We will not argue with this and just count ... | 1,556 |
Title: Game on Paper
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
One not particularly beautiful evening Valera got very bored. To amuse himself a little bit, he found the following game.
He took a checkered white square piece of paper, consisting of *n*<=Γ<=*n* cells. After that, he s... | 1,557 |
Title: World Tour
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
A famous sculptor Cicasso goes to a world tour!
Well, it is not actually a world-wide. But not everyone should have the opportunity to see works of sculptor, shouldn't he? Otherwise there will be no any exclusivity. So Cica... | 1,558 |
Title: Parcels
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Jaroslav owns a small courier service. He has recently got and introduced a new system of processing parcels. Each parcel is a box, the box has its weight and strength. The system works as follows. It originally has an empty pl... | 1,559 |
Title: Yet Another Array Queries Problem
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
You are given an array *a* of size *n*, and *q* queries to it. There are queries of two types:
- 1 *l**i* *r**i* β perform a cyclic shift of the segment [*l**i*,<=*r**i*] to the right. That is, for ... | 1,560 |
Title: Restoration of string
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
A substring of some string is called the most frequent, if the number of its occurrences is not less than number of occurrences of any other substring.
You are given a set of strings. A string (not necessarily fr... | 1,561 |
Title: Planar Graph
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
A graph is called planar, if it can be drawn in such a way that its edges intersect only at their vertexes.
An articulation point is such a vertex of an undirected graph, that when removed increases the number of connecte... | 1,562 |
Title: LIS of Sequence
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
The next "Data Structures and Algorithms" lesson will be about Longest Increasing Subsequence (LIS for short) of a sequence. For better understanding, Nam decided to learn it a few days before the lesson.
Nam created a... | 1,563 |
Title: Take-off Ramps
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Vasya participates in a ski race along the *X* axis. The start is at point 0, and the finish is at *L*, that is, at a distance *L* meters from the start in the positive direction of the axis. Vasya has been training so h... | 1,564 |
Title: Two out of Three
Time Limit: 2 seconds
Memory Limit: 256 megabytes
Problem Description:
Vasya has recently developed a new algorithm to optimize the reception of customer flow and he considered the following problem.
Let the queue to the cashier contain *n* people, at that each of them is characterized by a ... | 1,565 |
Title: File Name
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
You can not just take the file and send it. When Polycarp trying to send a file in the social network "Codehorses", he encountered an unexpected problem. If the name of the file contains three or more "x" (lowercase Latin let... | 1,566 |
Title: none
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Hamed has recently found a string *t* and suddenly became quite fond of it. He spent several days trying to find all occurrences of *t* in other strings he had. Finally he became tired and started thinking about the following prob... | 1,567 |
Title: none
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
You are given a sequence of n integers *a*1,<=*a*2,<=...,<=*a**n*.
Determine a real number *x* such that the weakness of the sequence *a*1<=-<=*x*,<=*a*2<=-<=*x*,<=...,<=*a**n*<=-<=*x* is as small as possible.
The weakness of a... | 1,568 |
Title: Little Elephant and Triangle
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
The Little Elephant is playing with the Cartesian coordinates' system. Most of all he likes playing with integer points. The Little Elephant defines an integer point as a pair of integers (*x*;Β *y*), such t... | 1,569 |
Title: Hiking
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
A traveler is planning a water hike along the river. He noted the suitable rest points for the night and wrote out their distances from the starting point. Each of these locations is further characterized by its picturesqueness,... | 1,570 |
Title: The Winds of Winter
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Given a rooted tree with *n* nodes. The Night King removes exactly one node from the tree and all the edges associated with it. Doing this splits the tree and forms a forest. The node which is removed is not a part ... | 1,571 |
Title: none
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
A team of students from the city S is sent to the All-Berland Olympiad in Informatics. Traditionally, they go on the train. All students have bought tickets in one carriage, consisting of *n* compartments (each compartment has exa... | 1,572 |
Title: Automatic Door
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
There is an automatic door at the entrance of a factory. The door works in the following way:
- when one or several people come to the door and it is closed, the door immediately opens automatically and all people imme... | 1,573 |
Title: Weak Subsequence
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Little Petya very much likes strings. Recently he has received a voucher to purchase a string as a gift from his mother. The string can be bought in the local shop. One can consider that the shop has all sorts of strin... | 1,574 |
Title: Mashmokh and Water Tanks
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Mashmokh is playing a new game. In the beginning he has *k* liters of water and *p* coins. Additionally he has a rooted tree (an undirected connected acyclic graph) that consists of *m* vertices. Each vertex of... | 1,575 |
Title: Lucky Numbers
Time Limit: 2 seconds
Memory Limit: 256 megabytes
Problem Description:
Petya loves lucky numbers. Everybody knows that positive integers are lucky if their decimal representation doesn't contain digits other than 4 and 7. For example, numbers 47, 744, 4 are lucky and 5, 17, 467 are not.
Lucky n... | 1,576 |
Title: An abandoned sentiment from past
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
A few years ago, Hitagi encountered a giant crab, who stole the whole of her body weight. Ever since, she tried to avoid contact with others, for fear that this secret might be noticed.
To get rid of t... | 1,577 |
Title: Interactive Bulls and Cows (Easy)
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
This problem is a little bit unusual. Here you are to implement an interaction with a testing system. That means that you can make queries and get responses in the online mode. Please be sure to use th... | 1,578 |
Title: Codeword
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
The famous sculptor Cicasso is a Reberlandian spy!
These is breaking news in Berlandian papers today. And now the sculptor is hiding. This time you give the shelter to the maestro. You have a protected bunker and you provide ... | 1,579 |
Title: Genetic Engineering
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
You will receive 3 points for solving this problem.
Manao is designing the genetic code for a new type of algae to efficiently produce fuel. Specifically, Manao is focusing on a stretch of DNA that encodes one prot... | 1,580 |
Title: On Number of Decompositions into Multipliers
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
You are given an integer *m* as a product of integers *a*1,<=*a*2,<=... *a**n* . Your task is to find the number of distinct decompositions of number *m* into the product of *n* ordered posi... | 1,581 |
Title: New Year and Three Musketeers
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
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 found three brave warriors and called them the three musketeers. Ath... | 1,582 |
Title: Megacity
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
The administration of the Tomsk Region firmly believes that it's time to become a megacity (that is, get population of one million). Instead of improving the demographic situation, they decided to achieve its goal by expanding... | 1,583 |
Title: Name
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Everything got unclear to us in a far away constellation Tau Ceti. Specifically, the Taucetians choose names to their children in a very peculiar manner.
Two young parents abac and bbad think what name to give to their first-born... | 1,584 |
Title: Google Code Jam
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Many of you must be familiar with the Google Code Jam round rules. Let us remind you of some key moments that are crucial to solving this problem. During the round, the participants are suggested to solve several proble... | 1,585 |
Title: A Colourful Prospect
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Firecrackers scare Nian the monster, but they're wayyyyy too noisy! Maybe fireworks make a nice complement.
Little Tommy is watching a firework show. As circular shapes spread across the sky, a splendid view unfol... | 1,586 |
Title: Innokenty and a Football League
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Innokenty is a president of a new football league in Byteland. The first task he should do is to assign short names to all clubs to be shown on TV next to the score. Of course, the short names should be ... | 1,587 |
Title: Martian Colony
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
The first ship with the Earth settlers landed on Mars. The colonists managed to build *n* necessary structures on the surface of the planet (which can be regarded as a plane, and the construction can be regarded as point... | 1,588 |
Title: Little Frog
Time Limit: 2 seconds
Memory Limit: 256 megabytes
Problem Description:
Once upon a time a little frog whose name was Vasya decided to travel around his home swamp. Overall there are *n* mounds on the swamp, located on one line. The distance between the neighboring mounds is one meter. Vasya wants ... | 1,589 |
Title: Dasha and Stairs
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
On her way to programming school tiger Dasha faced her first test β a huge staircase!
The steps were numbered from one to infinity. As we know, tigers are very fond of all striped things, it is possible that it has so... | 1,590 |
Title: Game of Robots
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
In late autumn evening *n* robots gathered in the cheerful company of friends. Each robot has a unique identifierΒ β an integer from 1 to 109.
At some moment, robots decided to play the game "Snowball". Below there are t... | 1,591 |
Title: Turing Tape
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
INTERCAL is the oldest of esoteric programming languages. One of its many weird features is the method of character-based output, known as Turing Tape method. It converts an array of unsigned 8-bit integers into a sequence ... | 1,592 |
Title: Vasya and Robot
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Vasya has *n* items lying in a line. The items are consecutively numbered by numbers from 1 to *n* in such a way that the leftmost item has number 1, the rightmost item has number *n*. Each item has a weight, the *i*-th... | 1,593 |
Title: Sereja and Subsequences
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Sereja has a sequence that consists of *n* positive integers, *a*1,<=*a*2,<=...,<=*a**n*.
First Sereja took a piece of squared paper and wrote all distinct non-empty non-decreasing subsequences of sequence *a*... | 1,594 |
Title: Sum the Fibonacci
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
You are given an array *s* of *n* non-negative integers.
A 5-tuple of integers (*a*,<=*b*,<=*c*,<=*d*,<=*e*) is said to be valid if it satisfies the following conditions:
- 1<=β€<=*a*,<=*b*,<=*c*,<=*d*,<=*e*<=β€<=*n... | 1,595 |
Title: Labyrinth-14
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
See the problem statement here: [http://codeforces.com/contest/921/problem/01](//codeforces.com/contest/921/problem/01).
Input Specification:
none
Output Specification:
none
Note:
none | 1,596 |
Title: none
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
One day Petya was solving a very interesting problem. But although he used many optimization techniques, his solution still got Time limit exceeded verdict. Petya conducted a thorough analysis of his program and found out that his... | 1,597 |
Title: The Artful Expedient
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Rock... Paper!
After Karen have found the deterministic winning (losing?) strategy for rock-paper-scissors, her brother, Koyomi, comes up with a new game as a substitute. The game works as follows.
A positive int... | 1,598 |
Title: Lucky Transformation
Time Limit: None seconds
Memory Limit: None megabytes
Problem Description:
Petya loves lucky numbers. Everybody knows that lucky numbers are positive integers whose decimal representation contains only the lucky digits 4 and 7. For example, numbers 47, 744, 4 are lucky and 5, 17, 467 are ... | 1,599 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.