随笔分类 - codeforces
摘要:It's that time of the year, Felicity is around the corner and you can see people celebrating all around the Himalayan region. The Himalayan region has
阅读全文
摘要:Bash has set out on a journey to become the greatest Pokemon master. To get his first Pokemon, he went to Professor Zulu's Lab. Since Bash is Professo
阅读全文
摘要:Bash wants to become a Pokemon master one day. Although he liked a lot of Pokemon, he has always been fascinated by Bulbasaur the most. Soon, things s
阅读全文
摘要:Country of Metropolia is holding Olympiad of Metrpolises soon. It mean that all jury members of the olympiad should meet together in Metropolis (the c
阅读全文
摘要:Helen works in Metropolis airport. She is responsible for creating a departure schedule. There are n flights that must depart today, the i-th of them
阅读全文
摘要:Maxim wants to buy an apartment in a new house at Line Avenue of Metropolis. The house has n apartments that are numbered from 1 to nand are arranged
阅读全文
摘要:Petya is a big fan of mathematics, especially its part related to fractions. Recently he learned that a fraction is called proper iff its numerator is
阅读全文
摘要:Arpa has found a list containing n numbers. He calls a list bad if and only if it is not empty and gcd (see notes section for more information) of num
阅读全文
摘要:You are given set of n points in 5-dimensional space. The points are labeled from 1 to n. No two points coincide. We will call point a bad if there ar
阅读全文
摘要:Arpa is taking a geometry exam. Here is the last problem of the exam. You are given three points a, b, c. Find a point and an angle such that if we ro
阅读全文
摘要:Arpa is researching the Mexican wave. There are n spectators in the stadium, labeled from 1 to n. They start the Mexican wave at time 0. At time 1, th
阅读全文
摘要:From beginning till end, this message has been waiting to be conveyed. For a given unordered multiset of n lowercase English letters ("multi" means th
阅读全文
摘要: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, yi).
阅读全文
摘要:Where do odds begin, and where do they end? Where does hope emerge, and will they ever break? Given an integer sequence a1, a2, ..., an of length n. D
阅读全文
摘要:The organizers of a programming contest have decided to present t-shirts to participants. There are six different t-shirts sizes in this problem: S,M,
阅读全文
摘要:This is an interactive problem. You should use flush operation after each printed line. For example, in C++ you should usefflush(stdout), in Java you
阅读全文
摘要:Vasily exited from a store and now he wants to recheck the total price of all purchases in his bill. The bill is a string in which the names of the pu
阅读全文
摘要:Vasily has a number a, which he wants to turn into a number b. For this purpose, he can do two types of operations: multiply the current number by 2 (
阅读全文
摘要:Mahmoud and Ehab live in a country with n cities numbered from 1 to n and connected by n - 1 undirected roads. It's guaranteed that you can reach any
阅读全文
摘要:Mahmoud wants to write a new dictionary that contains n words and relations between them. There are two types of relations: synonymy (i. e. the two wo
阅读全文