0%

Codeforces 195A - Let’s Watch Football

Let’s Watch Football

Valeric and Valerko missed the last Euro football game, so they decided to watch the game’s key moments on the Net. They want to start watching as soon as possible but the connection speed is too low. If they turn on the video right now, it will “hang up” as the size of data to watch per second will be more than the size of downloaded data per second.

閱讀全文 »

Codeforces 967B - Watering System

Watering System

Arkady wants to water his only flower. Unfortunately, he has a very poor watering system that was designed for n flowers and so it looks like a pipe with n holes. Arkady can only use the water that flows from the first hole.

閱讀全文 »

Codeforces 992A - Nastya and an Array

Nastya and an Array

Nastya owns too many arrays now, so she wants to delete the least important of them. However, she discovered that this array is magic! Nastya now knows that the array has the following properties:

閱讀全文 »

Codeforces 313A - Ilya and Bank Account

Ilya and Bank Account

Ilya is a very clever lion, he lives in an unusual city ZooVille. In this city all the animals have their rights and obligations. Moreover, they even have their own bank accounts. The state of a bank account is an integer. The state of a bank account can be a negative number. This means that the owner of the account owes the bank money.

閱讀全文 »

Codeforces 136A - Presents

Presents

Little Petya very much likes gifts. Recently he has received a new laptop as a New Year gift from his mother. He immediately decided to give it to somebody else as what can be more pleasant than giving somebody gifts. And on this occasion he organized a New Year party at his place and invited n his friends there.

閱讀全文 »

Codeforces 1099B - Squares and Segments

Squares and Segments

Little Sofia is in fourth grade. Today in the geometry lesson she learned about segments and squares. On the way home, she decided to draw n squares in the snow with a side length of 1. For simplicity, we assume that Sofia lives on a plane and can draw only segments of length 1, parallel to the coordinate axes, with vertices at integer points.

閱讀全文 »

Codeforces 706B - Interesting drink

Interesting drink

Vasiliy likes to rest after a hard work, so you may often meet him in some bar nearby. As all programmers do, he loves the famous drink “Beecola”, which can be bought in n different shops in the city. It’s known that the price of one bottle in the shop i is equal to xi coins.

閱讀全文 »

Codeforces 1138A - Sushi for Two

Sushi for Two

Arkady invited Anna for a dinner to a sushi restaurant. The restaurant is a bit unusual: it offers n pieces of sushi aligned in a row, and a customer has to choose a continuous subsegment of these sushi to buy.

閱讀全文 »

Codeforces 1015C - Songs Compression

Songs Compression

Ivan has n songs on his phone. The size of the i-th song is ai bytes. Ivan also has a flash drive which can hold at most m bytes in total. Initially, his flash drive is empty.

閱讀全文 »