
Hongcow’s Game
This is an interactive problem. In the interaction section below you will see the information about flushing the output. In this problem, you will be […]
This is an interactive problem. In the interaction section below you will see the information about flushing the output. In this problem, you will be […]
Hongcow really likes the color red. Hongcow doesn’t like the color blue. Hongcow is standing in an infinite field where there are n red points and m blue points. […]
Limak is going to participate in a contest on the last day of the 2016. The contest will start at 20:00 and will last four […]
Every Codeforces user has rating, described with one integer, possibly negative or zero. Users are divided into two divisions. The first division is for users […]
In this problem we assume the Earth to be a completely round ball and its surface a perfect sphere. The length of the equator and […]
One tradition of welcoming the New Year is launching fireworks into the sky. Usually a launched firework flies vertically upward for some period of time, […]
The New Year tree is an infinite perfect binary tree rooted in the node 1. Each node v has two children: nodes indexed (2·v) and (2·v + 1). Polar bears love decorating the […]
This is an interactive problem. In the interaction section below you will find the information about flushing the output. The New Year tree of height h is […]
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. […]
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 got tired on his journey to become the greatest Pokemon master. So he decides to take a break and play with functions. Bash defines […]
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 […]
The gym leaders were fascinated by the evolutions which took place at Felicity camp. So, they were curious to know about the secret behind evolving […]
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 […]
PolandBall is a young, clever Ball. He is interested in prime numbers. He has stated a following hypothesis: “There exists such a positive integer n that for […]
PolandBall is playing a game with EnemyBall. The rules are simple. Players have to say words in turns. You cannot say a word which was […]
PolandBall has such a convex polygon with n veritces that no three of its diagonals intersect at the same point. PolandBall decided to improve it and draw […]
PolandBall lives in a forest with his family. There are some trees in the forest. Trees are undirected acyclic graphs with k vertices and k - 1 edges, where k is some integer. […]
It’s Christmas time! PolandBall and his friends will be giving themselves gifts. There are n Balls overall. Each Ball has someone for whom he should bring a […]
PolandBall has an undirected simple graph consisting of n vertices. Unfortunately, it has no edges. The graph is very sad because of that. PolandBall wanted to make […]