Codeforces

May 02, 2025 Codeforces

Diagonal Walking

Mikhail walks on a 2D plane. He can go either up or right. You are given a sequence of Mikhail's moves. He thinks that this sequence is too long and he wants.

Read more →
Sep 01, 2025 Codeforces

Add Candies

There are n bags with candies, initially the -th bag contains i candies. You want all the bags to contain an equal amount of candies in the end.

Read more →
Jul 06, 2025 Codeforces

Drinks Choosing

Old timers of Summer Informatics School can remember previous camps in which each student was given a drink of his choice on the vechorka

Read more →
May 22, 2025 Codeforces

Find Amir

A few years ago Sajjad left his school and register to another one due to security reasons. Now he wishes to find Amir, one of his schoolmates and good friends.

Read more →
Sep 09, 2025 Codeforces

Rumor

Vova promised himself that he would never play computer games... But recently Firestorm — a well-known game developing company

Read more →
Sep 05, 2025 Codeforces

From S To T

You are given three strings s, t and p consisting of lowercase Latin letters. You may perform any number (possibly, zero) operations on these strings.

Read more →
Jun 28, 2025 Codeforces

Badge

In Summer Informatics School, if a student doesn't behave well, teachers make a hole in his badge. And today one of the teachers caught a group of n students

Read more →
Apr 23, 2025 Codeforces

Key races

Two boys decided to compete in text typing on the site "Key races". During the competition, they have to type a text consisting of s characters

Read more →
Jun 27, 2025 Codeforces

QAQ

QAQ" is a word to denote an expression of crying. Imagine "Q" as eyes with tears and "A" as a mouth.

Read more →
Mar 30, 2025 Codeforces

427 Prison Transfer

The prison of your city has n prisoners. As the prison can't accommodate all of them, the city mayor has decided to transfer c of the prisoners to a prison.

Read more →
Apr 24, 2025 Codeforces

3 Palindrome

In the beginning of the new year Keivan decided to reverse his name. He doesn't like palindromes, so he changed Naviek to Navick.

Read more →
Jun 18, 2025 Codeforces

Elections

Elections are taking place in Berland. There are n candidates participating in the elections, numbered from 1 to n

Read more →
Apr 17, 2025 Codeforces

Game With Sticks

After winning gold and silver in IOI 2014, Akshat and Malvika want to have some fun. Now they are playing a game on a grid made of n horizontal and m vertical.

Read more →
Aug 30, 2025 Codeforces

Smallest Word

A has so many colorful magnets on her fridge! Exactly one letter is written on each magnet, 'a' or 'b'. She loves to play with them.

Read more →
May 01, 2025 Codeforces

Fake NP

Tavak and Seyyed are good friends. Seyyed is very funny and he told Tavak to solve the following problem instead of longest-path.

Read more →
Mar 17, 2025 Codeforces

Problem - 158B Taxi

After the lessons n groups of schoolchildren went outside and decided to visit Polycarpus to celebrate his birthday. We know that the i-th group consists

Read more →
Sep 02, 2025 Codeforces

Alphabetic Removals

You are given a string sconsisting of n lowercase Latin letters. Polycarp wants to remove exactly k characters (k≤n) from the string s. Polycarp uses the

Read more →
May 18, 2025 Codeforces

Diagonal Walking

Mikhail walks on a 2D plane. He can go either up or right. You are given a sequence of Mikhail's moves. He thinks that this sequence is too long and he wants.

Read more →
Jun 11, 2025 Codeforces

Benches

There are n benches in the Berland Central park. It is known that a people are currently sitting on the bench

Read more →
May 23, 2025 Codeforces

Equator

Polycarp has created his own training plan to prepare for the programming contests. He will train for n days, all days are numbered from 1 to n beginning

Read more →
Jul 08, 2025 Codeforces

Fair Game

Petya and Vasya decided to play a game. They have n cards (n is an even number). A single integer is written on each card.

Read more →
Aug 27, 2025 Codeforces

Views Matter

You came to the exhibition and one exhibit has drawn your attention. It consists of n stacks of blocks, where the i-th stack consists of ai blocks resting on

Read more →
Jul 26, 2025 Codeforces

Snowball

Today's morning was exceptionally snowy. Meshanya decided to go outside and noticed a huge snowball rolling down the mountain.

Read more →