By SleepyShashwat, 13 days ago, In English

Good Evening Codeforces! ^_^

This round is unrated; please read this to know why.

I invite you to participate in Codeforces Round #682 (Div.2) taking place on Nov/13/2020 17:35 (Moscow time). The round, authored by Anti-Light and me, is rated for users rated less than 2100, while other users can participate non-competitively.

The round features six problems, and you have 2 hours to solve them. There may, or may not, be an interactive problem; regardless, you should know how to deal with them.

I would, now, like to thank–

We will announce the scoring distribution shortly. The scoring distribution is 500–750–1250–1750–2250-3000.

Good luck, and stay safe!

UPD: Editorial

For students in high school or below—

Participants who are currently in high school or below are eligible to win prizes — 25 USD gift cards to 5 random participants who solve at least 3 problems. Prizes are sponsored by Athena Education and are NOT related to Codeforces. To be eligible, please fill this form (it will be closed after the round ends). If you're interested in participating in other technical events, such as Machine Learning and Computational Linguistics, please head over to

Read more »

  • Vote: I like it
  • +240
  • Vote: I do not like it

By BledDest, history, 2 weeks ago, In English

Hello, Codeforces!

First and foremost, we would like to say a massive thank you to everyone who entered and submitted their answers to the first, second, third, and fourth Kotlin Heroes competitions which were held previously: Episode 1, Episode 2, Episode 3 and Episode 4.

Ready to challenge yourself to do better? The Kotlin Heroes 5: ICPC Round competition will be hosted on the Codeforces platform on Nov/12/2020 17:35 (Moscow time). The contest will last 2 hours 30 minutes and will feature a set of problems from simple ones, designed to be solvable by anyone, to hard ones, to make it interesting for seasoned competitive programmers.


Top three winners will get prizes of $512, $256, and $128 respectively, top 50 will win a Kotlin Heroes t-shirt and an exclusive Kotlin sticker, competitors solving at least one problem will enter into a draw for one of 50 Kotlin Heroes t-shirts.

Everyone who takes part in this round will get an electronic Participation Certificate.

There is also a special recognition prize from the ICPC: ICPC- experience, an invitation to the Moscow World Finals 2021, all-inclusive on-site (hotel, meals, ceremonies, and swag, are included; visa, flights, transportation to the contest location is not).

Registration is already open and available via the link. It will be available until the end of the round.

The round will again be held in accordance with a set of slightly modified ICPC rules:

  • The round is unrated.
  • The contest will have 9 problems of various levels of complexity.
  • You are only allowed to use Kotlin to solve these problems.
  • Participants are ranked according to the number of correctly solved problems. Ties are resolved based on the lowest total penalty time for all problems, which is computed as follows. For each solved problem, a penalty is set to the submission time of that problem (the time since the start of the contest). An extra penalty of 10 minutes is added for each failed submission on solved problems (i. e., if you never solve the problem, you will not be penalized for trying that problem). If two participants solved the same number of problems and scored the same penalty, then those of them who had previously made the last successful submission will be given an advantage in the distribution of prizes and gifts.


If you are still new to Kotlin we have prepared a tutorial on competitive programming in Kotlin and Kotlin Heroes 5: ICPC Round (Practice), where you can try to solve a few simple problems in Kotlin. All the solutions are open, which means that you can look at the solution even if you haven't solved the problem yet. The practice round is available by the link.

We wish you luck and hope you enjoy Kotlin.

UPD: The editorial can be found here.

Read more »

Announcement of Kotlin Heroes 5: ICPC Round
  • Vote: I like it
  • +165
  • Vote: I do not like it

By gisp_zjz, history, 2 weeks ago, In English

Hello! I'm happy to announce XXI Open Cup: Grand Prix of Weihai, which will be held today.

Authors of this contest come from Nanjing University, including gisp_zjz, zyb, sy_chen, Roundgod, calabash_boy, uuzlovetree,liziy. This contest was originally used as China Collegiate Programming Contest(CCPC), Weihai Site. Enjoy!

Testers: -skyline-, chenjb, Subconscious, oipotato, 374272,VincentLx, Shedneryan, Icdereap. Thank you!

Contest link: (Only visible for users with OpenCup login)

I will post the editorial after the contest. We are looking forward to your participation!

Read more »

  • Vote: I like it
  • +234
  • Vote: I do not like it

By ICPCNews, 3 weeks ago, In English


Dear friends!

We are thrilled to invite you to join us in this unique educational event to mark the beginning of ICPC competitive season and the academic year. Join us in JetBrains Knowledge Day on November 6!

Join now Live broadcast

You will learn firsthand tips from the JetBrains team about performance tuning in CLion and IntelliJ IDEA, the advantages of Kotlin for algorithmic problem-solving, the benefits of using our educational products, and much more! You’ll be able to ask the team all you’ve ever wanted to know about Kotlin, IDEs, and tools via chat or during the Q&A sessions with the presenters.

Buckle up for some great talks from eminent competitive programmers and industry experts:

  • 11:00 am – 11:30 am UTC — Welcome and Keynote (Roman Elizarov, Team Lead in Kotlin Language Research)
  • 11:30 am – 12:00 pm UTC — Train Hard, Code Easy: Best Practices for Competitive Coding with Kotlin (Mikhail Dvorkin, ICPC Gold Medal Winner)
  • 12:00 pm – 12:30 pm UTC — CLion, Because C++ Can Be Competitive (Phil Nash, Developer Advocate)
  • 12:30 pm – 1:00 pm UTC — Code Faster with IntelliJ IDEA (Helen Scott, Developer Advocate)
  • 1:00 pm – 1:30 pm UTC — Educational Products for Academia and Competitive Programming (Olga Telezhnaya, Developer at Educational Products)
  • 1:30 pm – 1:45 pm UTC — 10 Reasons Why Educators Choose Kotlin (Ksenia Shneyveys, Kotlin Manager for Education)
  • 1:45 pm – 2:00 pm UTC — Closing session

Read more »

  • Vote: I like it
  • +109
  • Vote: I do not like it

By PavelKunyavskiy, 3 weeks ago, translation, In English

Today we will celebrate the winners of the VK Cup 2019-2020! Even though finalists will not get together on the New Stage of Alexandrinsky Theatre in St. Petersburg, as initially planned, they will battle for the bragging rights to be called VK Cup Champion and the grand prize of 524 288 rubles. Best of luck to all the finalists!

On Nov/02/2020 17:35 (Moscow time) we invite everyone to participate in Codeforces Round #681 (Div. 1, based on VK Cup 2019-2020 - Final) and Codeforces Round #681 (Div. 2, based on VK Cup 2019-2020 - Final).

VK Cup problems are created and prepared by 300iq together with the VK team PavelKunyavskiy, izban, YakutovDmitriy, Kurpilyansky and .tx. Additional problems for codeforces rounds were authored and prepared by Supermagzzz, Stepavly and MikeMirzayanov.

We’d like to thank for the huge help in preparing and testing the problems MikeMirzayanov, ecnerwala, Egor, hos.lyric, yosupo, lperovskaya, Stepavly, Supermagzzz, HIR180, qwerty787788.

Good luck and have fun!

UPD: And the winners are:

  1. tourist
  2. Endagorion
  3. Merkurev

Congratulations! Full scoreboard is available here.


Div.1 Scoring: 500 1000 1500 1750 1750 2500

Div.2 Scoring: 500 1000 1500 2000 2500 3000

UPD: Editorial

Read more »

  • Vote: I like it
  • +293
  • Vote: I do not like it

By ch_egor, 4 weeks ago, translation, In English

Hi everybody,

This Sunday there will be a XVII Moscow Team Olympiad, high school students competition based in Moscow that is an elimination contest for All-Russian Team Olympiad. This contest is prepared by Moscow Olympiad Scientific Committee that you may know by Moscow Open Olympiad, Moscow Olympiad for Young Students and Metropolises Olympiad (rounds 327, 342, 345, 376, 401, 433, 441, 466, 469, 507, 516, 541, 545, 567, 583, 594, 622, 626, 657).

The round will be held at Nov/01/2020 14:05 (Moscow time) and will last for 2 hours. Each division will have 5-6 problems. The round will be held according to the Codeforces rules and will be rated for both divisions.

Problems are prepared by grikukan, DrNykterstein, ismagilov.code, V--gLaSsH0ldEr593--V, KiKoS, wrg0ababd, ch_egor, Roms, voidmax, DebNatkh, Nebuchadnezzar, Endagorion, kraborak, 300iq, cdkrot, LHiC, vintage_Vlad_Makeev, V--o_o--V, grphil under my supervision with great help of GlebsHP, _meshanya_, Endagorion, Zlobober and Helen Andreeva.

Thanks to adedalic and KAN for the round coordination and verifying statement of original olympiad, _meshanya_ and cdkrot for statement translation, and also thanks for MikeMirzayanov for systems codeforces and polygon, which was used to prepare problems of this olympiad.

Good luck everybody!

UPD1: Thanks to Um_nik, satashun, mraron, ustze, Karavaev1101, YanickChen for testing.

UPD2: Scoring distribution:

Div.1: 500 — 1000 — 1500 — 2000 — 3000

Div.2: 500 — 1000 — 1500 — 2000 — 2500

UPD3: Editorial

UPD4: Winners!

Div. 1:

  1. hos.lyric
  2. Benq
  3. ksun48
  4. Isonan
  5. jiangly

Div. 2:

  2. farzi_log
  3. jiazp
  4. c2020HXW
  5. lavenderwithbluish

Read more »

  • Vote: I like it
  • +186
  • Vote: I do not like it

By pikmike, 4 weeks ago, translation, In English

Hello Codeforces!

On Oct/27/2020 17:35 (Moscow time) Educational Codeforces Round 97 (Rated for Div. 2) will start.

Series of Educational Rounds continue being held as Harbour.Space University initiative! You can read the details about the cooperation between Harbour.Space University and Codeforces in the blog post.

This round will be rated for the participants with rating lower than 2100. It will be held on extended ICPC rules. The penalty for each incorrect submission until the submission with a full solution is 10 minutes. After the end of the contest you will have 12 hours to hack any solution you want. You will have access to copy any solution and test it locally.

You will be given 6 or 7 problems and 2 hours to solve them.

The problems were invented and prepared by Roman Roms Glazov, Adilbek adedalic Dalabaev, Vladimir vovuh Petrov, Ivan BledDest Androsov, Maksim Ne0n25 Mescheryakov and me. Also huge thanks to Mike MikeMirzayanov Mirzayanov for great systems Polygon and Codeforces.

Good luck to all the participants!

Congratulations to the winners:

Rank Competitor Problems Solved Penalty
1 Um_nik 7 149
2 jiangly 7 193
3 hank55663 7 214
4 neal 7 231
5 uwi 7 250

205 successful hacks and 712 unsuccessful hacks were made in total!

And finally people who were the first to solve each problem:

Problem Competitor Penalty
A Drew_is_me 0:01
B Drew_is_me 0:03
C IgorI 0:03
D xb0nS 0:09
E hongvip1638 0:17
F SunshinePie 0:28
G tfg 0:13

UPD: Editorial is out

Read more »

  • Vote: I like it
  • +356
  • Vote: I do not like it

By Golovanov399, 4 weeks ago, translation, In English

Hi all!

This weekend, at Oct/25/2020 14:05 (Moscow time) we will hold Codeforces Round 679. It is based on problems of Technocup 2021 Elimination Round 1 that will be held at the same time.

Technocup is a major olympiad for Russian-speaking high-school students, so if you fall into this category, please register at Technocup 2021 website and take part in the Elimination Round.

Div. 1 and Div.2 editions are open and rated for everyone. Register and enjoy the contests!

The Elimination Round authors are AndreySergunin, Endagorion, amethyst0, and me, Golovanov399. Thanks to KAN and 300iq for their coordination. This round would also be not possible without the help of our testers: __rkm__, 300iq, arjunsanjeev7, brunomont, Chocobar, iankury, low_, psevdoinsaf, scnucjh, and teapotd, thank you so much!

Have fun!

The Elimination Round will feature 6 problems, preliminary costs are
500 — 1000 — 1500 — 2000 — 2250 — 3000.

Div. 1 will feature 5 problems, preliminary costs are 500 — 1000 — 1250 — 2000 — 2500.

Div. 2 will feature 5 problems, preliminary costs are 500 — 1000 — 1500 — 2000 — 2250.

Добрый день!

В воскресенье, 25-го сентября в 14:05 по московскому времени состоится Отборочный Раунд 1 олимпиады для школьников Технокубок 2021. Раунд будет длиться два часа, участникам будут предложены 6 задач. По его результатам лучшие участники (но не более 45% от общего числа участников раунда) будут приглашены на финальный этап в Москву. Для регистрации на раунд и участия перейдите по ссылке. Не забудьте заранее зарегистрироваться на раунд! Для опоздавших будет открыта дополнительная регистрация (с 14:15 до 16:05).

Зарегистрироваться на Отборочный Раунд 1 →
Соревнование открыто для всех в виде отдельных раундов для первого и второго дивизионов.
Для всех участников всех трех редакций этого соревнования будет пересчитан рейтинг.

Параллельно с Отборочным Раундом будут проведены открытые рейтинговые раунды для обоих дивизионов, в них могут принять участие все желающие.

Напомним, что согласно правилам раундов Codeforces во время соревнования ваши решения будут тестироваться только на претестах (предварительном и неполном наборе тестов), а системное тестирование состоится после окончания раунда. Обратите внимание, что претесты не покрывают все возможные случаи входных данных, поэтому тщательно тестируйте свои программы! После прохождения претестов у вас будет возможность заблокировать решение, тем самым получив привилегию искать ошибки и взламывать чужие решения, но отказавшись от возможности перепослать ваше решение при каких-либо обстоятельствах (например, даже если вы найдете ошибку или вас взломают). Со временем задачи падают в стоимости. После системного тестирования учитываются только полные решения. Подробнее про правила соревнований можно прочитать по ссылкам:

Регистрация на олимпиаду Технокубок еще открыта. Победителей и призеров олимпиады ждут значительные квоты при поступлении в престижные технические вузы России и ценные призы! Если Вы школьник 8-11 классов и пока не зарегистрировались на Технокубок, то самое время сделать это:

Зарегистрироваться на олимпиаду →
После регистрации на олимпиаду не забудьте зарегистрироваться на Отборочный Раунд!

В финал соревнования будут приглашены лучшие участники каждого из отборочных раундов (но не более 45% от общего числа участников раунда).

Авторы отборочного раунда — AndreySergunin, Endagorion, amethyst0 и я, Golovanov399. Спасибо KAN и 300iq за координацию. Кроме того, хочу выразить благодарность тестерам, без помощи которых этот раунд не состоялся бы: __rkm__, 300iq, arjunsanjeev7, brunomont, Chocobar, iankury, low_, psevdoinsaf, scnucjh и teapotd!

Read more »

  • Vote: I like it
  • +237
  • Vote: I do not like it

By SecondThread, history, 4 weeks ago, In English

Algorithms Thread Episode 9: Treaps

Good morning everyone!

Episode 9 of AlgorithmsThread comes out shortly after the Div2 round ends. This episode is on Treaps! It covers:

  • Fundamentals of Treaps
  • Splitting and Merging
  • Range reversing

... and more! I also decided to keep up the super-high quality style and made a custom gym set with 5(+2) original problems to make sure you really understand everything that was covered in the lecture. The gym set will be released shortly after the lecture ends, and I hope that the problems will be challenging and fun, even for people who aren't seeing treaps for the first time.

If you have any questions or suggestions, feel free to leave them below. I hope you enjoy the problem statements, and, in the spirit of the upcoming holiday, I'll leave you all with this:

Update: The scoring distribution for this round will be: 1 — 1 — 1 — 1 — (+1) — (+1) — 1

Update2: Solution video is out now and solutions to all problems are available here. Hope you all enjoyed the contest!

Read more »

  • Vote: I like it
  • +969
  • Vote: I do not like it