By ch_egor, 6 weeks ago, translation, In English


Right now happens the first tour of the Open Olympiad in Informatics, and tomorrow will be the second one. This contest is prepared by Moscow Olympiad Scientific Committee that you may know by Moscow Team 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, 680, 704).

Open Olympiad consists of the most interesting and hard problems that are proposed by a wide community of authors, so we decided to conduct a Codeforces regular round based on it, which will happen on Mar/13/2021 12:05 (Moscow time) and will be based on both days of the Olympiad. Each division will have 6 problems and 2 and a half hours to solve them.

We kindly ask all the community members that are going to participate in the competition to show sportsmanship by not trying to cheat in any manner, in particular, by trying to figure out problem statements from the onsite participants. If you end up knowing some of the problems of Moscow Open Olympiad (by participating in it, from some of the onsite contestants or in any other way), please do not participate in the round. We also ask onsite contestants to not discuss problems in public. Failure to comply with any of the rules above may result in a disqualification.

Problems of this competition were prepared by Akulyat, KiKoS, wrg0ababd, Nebuchadnezzar, biection, alexX512 isaf27, ismagilov.code, DebNatkh, Siberian, NiceClock guided by cdkrot, vintage_Vlad_Makeev, GlebsHP, Zlobober, meshanya, ch_egor, grphil, voidmax, Endagorion and Helen Andreeva.

Thanks to adedalic and KAN for the round coordination, statement translation and preparation of problems for the second division, and also thanks for MikeMirzayanov for systems Codeforces and Polygon, which was used to prepare problems of this olympiad.

Also thanks to 4qqqq and Aleks5d for providing an additional problems that helped to create (I hope) a balanced problem set for the round, and Um_nik for testing!

Good luck everybody!

Due to the official competition source codes of other participants will not be available for an hour after the end of the round.


Please do not discuss problems publicly until 12:30 UTC.

The scoring distribution for both divisions is not standard:

  • div1: 750 — 750 — 1500 — 2000 — 2500 — 3000
  • div2: 500 — 1000 — 1750 — 1750 — 2500 — 3000

UPD2: Editorial

UPD3: Winners!

Div. 1:

  1. tourist
  2. jiangly
  3. maroonrk
  4. ecnerwala
  5. Miracle03

Div. 2:

  1. wudi2016
  2. ShimaRin
  3. fengqiyuka
  4. gezlik
  5. b___

Read more »

  • Vote: I like it
  • -695
  • Vote: I do not like it

By Imakf, history, 7 weeks ago, In English

Hello, Codeforces!

Daniel_yuan, waaitg, smg23333 and I are glad to invite you to Codeforces Round #706 (Div. 1) and Codeforces Round #706 (Div. 2), which will take place on 10.03.2021 15:05 (Московское время). Note the unusual time of the round. In both divisions, you will be given 6 problems and 2 hours to solve them all.

We would like to thank:

Score distribution will be announced before the round.

Hope you all gain positive ratings $$$\Delta$$$ in this round!

UPD1: Score distribution is

Div. 2: $$$500-1000-1500-2000-2500-3000$$$

Div. 1: $$$500-1000-1500-2000-2500-3250$$$

UPD2: Editorial

UPD3: Congratulations to the winners:

Div 1:

  1. Radewoosh
  2. maroonrk
  3. tourist
  4. Um_nik
  5. Egor

Div 2:

  1. shikaichengwoerzi
  2. grey
  3. 2005lz
  4. sh_mug
  5. not_tehlka

Read more »

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

By BledDest, 7 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 five Kotlin Heroes competitions which were held previously: Episode 1, Episode 2, Episode 3, Episode 4, and Episode 5: ICPC Round.

Ready to challenge yourself to do better? The Kotlin Heroes: Episode 6 competition will be hosted on the Codeforces platform on Mar/09/2021 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.

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: Practice 6, where you can try to solve a few simple problems in Kotlin. The practice round is available by the link.

We wish you luck and hope you enjoy Kotlin.

Read more »

Announcement of Kotlin Heroes: Episode 6
Announcement of Kotlin Heroes: Practice 6
  • Vote: I like it
  • +168
  • Vote: I do not like it

By peltorator, 7 weeks ago, translation, In English


I continue to make videos on algorithms. This time the topic is more basic. In this video, I talk about prefix sums and how they can help you to find sum on segments. You can also learn from this video how to easily generalize prefix sums for 2D, 3D, 4D, etc. cases. In addition, we'll also talk about a simple concept named difference array, which can easily help in some sorts of situations where it seems like you need some complex data structures. And in the end, we'll learn how to add constants, arithmetic progressions, and even quadratic functions to a segment of an array.

Link to the video

The video is in Russian but English subtitles are available. I'd be glad if you watch the video and leave a comment below with your impressions, thoughts, and ideas for future videos. You may also want to text me on telegram if you didn't understand something or you have any questions. I'll be glad to answer!

I'm sorry you need to watch it with subtitles but I'm gonna make an English channel soon. So stay tuned!

If you didn't see it already, I also have a video on disjoint sparse table: here.

Codeforces group with a contest

My realizations:

1D prefix sums

1D prefix sums with structures

2 methods for finding 2D prefix sums: one, two

1D difference array

1D difference array with structures

Read more »

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

By AlFlen, 7 weeks ago, translation, In English

The future is bulletproof
The aftermath is secondary
It's time to do it now and do it loud!

Hello, Codeforces!

74TrAkToR and I are glad to invite you to our Codeforces Round #705 (Div. 2), which will be held at Mar/06/2021 17:05 (Moscow time). Notice the unusual time of the round. The round will be rated for all the participants with rating strictly less than 2100.

We have already held a round and we have worked on errors:

  • the statements will be short and clear
  • we tried to make pretests stronger
  • the editorial will be published shortly after the round ends

We would like to thank everyone who helped us a lot with round preparation.

You will be given 6 problems. You will have 2 hours 15 minutes to solve them.

UPD: Score distribution $$$750-1250-1750-2250-2750-3250$$$.

UPD2: Editorial

UPD3: Congratulations to the winners!

Div. 2:

  1. sawa855

  2. buihoatpt2k9

  3. Totiniii

  4. rainboy

  5. scli_kws

Div. 1 + Div. 2:

  1. neal

  2. BigBag

  3. fastmath

  4. Heltion

  5. tute7627

We wish everyone good luck!

Read more »

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

By awoo, history, 2 months ago, translation, In English

Hello Codeforces!

On Mar/02/2021 17:45 (Moscow time) Educational Codeforces Round 105 (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 Neon Mescheryakov and me. Also huge thanks to Mike MikeMirzayanov Mirzayanov for great systems Polygon and Codeforces.

Good luck to all the participants!

Our friends at Harbour.Space also have a message for you:

Codeforces and Harbour.Space

Amazing news once again, Codeforces!

We are especially glad to have a chance to share our scholarship opportunities more often!

This time we have partnered with OneRagtime again to open the door for an exciting career in technology for the most talented people in our network.

In partnership with OneRagtime, we are offering a full scholarship to study a Master’s in Computer Science at Harbour.Space while working as a Full Stack Developer at OneRagtime!

Scholarship Highlights:

Work in Europe’s most exciting tech cities

Scholarship value of up to €31,500

Competitive compensation for the internship at OneRagtime (€800 / month)

Opportunity to join OneRagtime full-time after graduation

Some of the advantages of working at OneRagtime:

  • International team
  • Fast-paced workplace
  • Be a part of the OneRagtime adventure!
  • Be fully immersed in the European tech ecosystem
  • Thrive within a Venture Capital that does things a little differently
  • Work in Europe’s most exciting tech cities

Codeforces and Harbour.Space

We have previously partnered with other companies like OneRagtime, Hansgrohe, Coherra, and Remy Robotics to empower young talents around the world and help them boost their tech career. We’ve already filled a few of the positions with OneRagtime including:

  • Full Stack Developer at OneRagtime awarded to Alejandro Martinez from Mexico
  • UI/UX designer at OneRagtime awarded to Davit Petriashvili from Georgia

We are always happy to see Codeforces members join the Harbour.Space family. Apply now to get a chance to learn from the best in the field and kickstart your career!

Keep in touch and follow us on LinkedIn for more scholarship opportunities. And follow us on Instagram to evidence student life, events, and success stories from our apprenticeship program students.

Good luck on your round, and see you next time!

Harbour.Space University

Congratulations to the winners:

Rank Competitor Problems Solved Penalty
1 antontrygubO_o 6 251
1 Pyqe 6 251
3 kefaa2 6 260
4 tute7627 6 272
5 Um_nik 6 288

Congratulations to the best hackers:

Rank Competitor Hack Count
1 noimi 11
2 neal 7
3 Origenes 6
4 Kregor 5:-2
5 chilliagon 5:-4
94 successful hacks and 293 unsuccessful hacks were made in total!

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

Problem Competitor Penalty
A noimi 0:01
B noimi 0:04
C wygzgyw 0:15
D conan1412yang99 0:16
E thenymphsofdelphi 0:15
F rainboy 0:35

UPD: Editorial is out

Read more »

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

By star_xingchen_c, 2 months ago, In English

Hello Codeforces!

On Feb/28/2021 16:35 (Moscow time) we will host Codeforces Global Round 13.

It is the first round of a 2021 series of Codeforces Global Rounds. The rounds are open and rated for everybody.

The prizes for this round:

  • 30 best participants get a t-shirt.
  • 20 t-shirts are randomly distributed among those with ranks between 31 and 500, inclusive.

The prizes for the 6-round series in 2021:

  • In each round top-100 participants get points according to the table.
  • The final result for each participant is equal to the sum of points he gets in the four rounds he placed the highest.
  • The best 20 participants over all series get sweatshirts and place certificates.

Thanks to XTX, which in 2021 supported the global rounds initiative!

The problems were written and prepared by 3.141592653, Widowmaker, Ynoi, errorgorn, oolimry, star_xingchen_c, syksykCCC.

We would also like to thank:

You will have 3 hours to solve 9 problems. We encourage you to read all the problems and solve them all.

One of these problems is interactive, please see the guide of interactive problems if you are not familiar with it.

UPD1: Scoring distribution: 500-750-1000-1250-1750-2000-2250-3000-5000

UPD2: Tutorial published.

UPD3: System testing finished, congrats to the winners!

  1. maroonrk
  2. DmitryGrigorev
  3. Petr
  4. jiangly
  5. RALZH
  6. qazswedx2
  7. sunset
  8. ecnerwala
  9. lumibons
  10. p_b_p_b

Read more »

Announcement of Codeforces Global Round 13
  • Vote: I like it
  • +1092
  • Vote: I do not like it

By ReplyChallenges, history, 2 months ago, In English

Hello Codeforces!

We're glad to invite you to the upcoming Reply Code Challenges 2021 edition, on 11th of March.

It's a free online team-based challenge and you can choose between:

Standard Edition: designed for university students and professionals

Each member of the first-placed team wins a Mac Book Pro™ 16 (2.3GHz 6-core 9th-generation Intel Core i9 processor, AMD Radeon Pro 5500M with 4GB of GDDR6 memory, 16GB 2666MHz DDR4 memory and 1TB SSD storage). The second-placed team members each win a Mac Mini™ (Apple M1 chip with 8-core CPU, 8-core GPU and 16-core Neural Engine, 256GB SSD storage), the team members placed third in the ranking each win Apple Air-pods Pro™.

Registration opened on

Teen Edition: designed for students aged 14 to 19

The winning team will receive 5,000 euros. The second-ranked team will receive 2,000 euros, the third-ranked team will receive 1,000 euros.

Registration opened on

Description and rules available online at on March 11th from 4.30pm to 8.30pm CET. To play you must form a team by March 10th.

Follow us on our Telegram Channel:

Read more »

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

By ch_egor, 2 months ago, translation, In English

Hi everybody,

This Tuesday there will be a Moscow programming competition for school students of grades from 6 to 9. This contest is prepared by Moscow Olympiad Scientific Committee that you may know by Moscow Open Olympiad, Moscow Team Olympiad and Metropolises Olympiad (rounds 327, 342, 345, 376, 401, 433, 441, 466, 469, 507, 516, 541, 545, 567, 583, 594, 622, 626, 657, 680).

Round will be held at Feb/23/2021 12:05 (Moscow time). You will be given 5 problems and 2 hours to solve them. Round will be rated for second division (rating below 2100). As usual, participants from the first division can participate in a contest out of competition.

Problems are prepared by grphil, Jatana, rip, Sehnsucht, DebNatkh, KiKoS, wrg0ababd, V--o_o--V, voidmax, meshanya, vintage_Vlad_Makeev under my supervision.

Thanks to adedalic for the round coordination, cdkrot and meshanya for statement translation, and also thanks for MikeMirzayanov for systems Codeforces and Polygon, which was used to prepare problems of this olympiad.

Also thanks to Noam527 for providing an additional problem that helped to create (I hope) a balanced problem set for the round.

Good luck everybody!

Due to the official competition source codes of other participants will not be available for an hour after the end of the round.

UPD1: Thanks to LHiC, awoo, ScarletS, adarsh7777, kassutta, raj_mehta_ for testing.


Scoring distribution: 500 — 1000 — 1500 — 2250 — 3000

UPD3: Editorial

UPD4: Winners!

Div. 2:

  1. InternetPerson10
  2. egor95123657
  3. hhhyyyfff
  4. xXx_KevinDu58_xXx
  5. Flying2021

Div. 1 + Div. 2:

  1. Um_nik
  2. qazswedx2
  3. 3.141592653
  4. BigBag
  5. InternetPerson10

Read more »

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

By vitovt, history, 2 months ago, translation, In English

Registration for International Data Analysis Olympiad (IDAO 2021) is open now. It’s being organized by HSE University and Yandex for the 4th time. Otkritie bank will be our platinum partner this year. The Olympiad will be convened by leading experts in data analysis and aims to bring together analysts, scientists, professionals, and junior researchers. Participation is free. Winners and prize-winners of IDAO 2021 will receive valuable prizes.

This year the online task is coming again from Physics. The task was given by the Laboratory of Methods for Big Data Analysis (LAMBDA, HSE University) together with CYGNO Collaboration (Italy).

The registration is open till March 12, 2021. The Olympiad includes two stages:

Online Stage (March 1-31):

  • Track 1: Traditional machine learning competition on Yandex.Contest platform. You will need to make new predictions and upload them to the automatic verification system.
  • Track 2: Come up with a solution for the same problem, keeping within a rigid framework of time and memory used.

Final (April 17-18):

  • top 30 teams according to the Online Stage results will be invited to the Online final.
  • In the final 36 hours of the competition, participants will try not just to train the model, but to create a full-fledged prototype, which will be tested both in terms of accuracy and performance.

Learn more:

Read more »

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