Codeforces celebrates 10 years! We are pleased to announce the crowdfunding-campaign. Congratulate us by the link ×

By vovuh, history, 2 days ago, translation, In English,


Hello! Codeforces Round #624 (Div. 3) will start at Feb/24/2020 17:35 (Moscow time). You will be offered 6 or 7 problems (or 8) with expected difficulties to compose an interesting competition for participants with ratings up to 1600. However, all of you who wish to take part and have rating 1600 or higher, can register for the round unofficially.

The round will be hosted by rules of educational rounds (extended ACM-ICPC). Thus, during the round, solutions will be judged on preliminary tests, and after the round it will be a 12-hour phase of open hacks. I tried to make strong tests — just like you will be upset if many solutions fail after the contest is over.

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

Note that the penalty for the wrong submission in this round (and the following Div. 3 rounds) is 10 minutes.

Remember that only the trusted participants of the third division will be included in the official standings table. As it is written by link, this is a compulsory measure for combating unsporting behavior. To qualify as a trusted participants of the third division, you must:

  • take part in at least two rated rounds (and solve at least one problem in each of them),
  • do not have a point of 1900 or higher in the rating.

Regardless of whether you are a trusted participant of the third division or not, if your rating is less than 1600, then the round will be rated for you.

Thanks to MikeMirzayanov for the platform, help with ideas for problems and for coordination of my work. Thanks to my good friends Daria ZeroAmbition Stepanova, Mikhail pikmike Piklyaev, Maksim Ne0n25 Mescheryakov and Ivan BledDest Androsov for help in round preparation and testing the round.

Good luck!


Thanks to Artem Rox Plotkin and Dmitrii _overrated_ Umnov for help with testing the round!

UPD: It turned out that in the problem C, such a test exists that the answer overflows 32-bit integer type (int). Since such a test was not in the test set, many participants made such a mistake. We decided to forbid such tests, additionally guaranteeing that the answer fits in int.

UPD2: Editorial is published!

Read more »

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

By 300iq, 3 days ago, translation, In English,

The elimination round of Engine VK Cup 2019-2020 will take place at Feb/23/2020 19:05 (Moscow time). This contest is intended for people who qualified earlier.

As usual, there will be two parallel rounds, one for each division, for everybody who can't take part in official round.

Thanks lperovskaya, MikeMirzayanov, PavelKunyavskiy, izban, Kurpilyansky, YakutovDmitry, 300iq for preparing the contest.

All three rounds will last 2 hours 30 minutes, and they will be rated. They will have six tasks, and you will be able to see the score distribution when the round starts.

Read more »

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

By ch_egor, 4 days ago, translation, In English,

Hi everybody,

This Sunday 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).

Round will be held at Feb/23/2020 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 KiKoS, DebNatkh, grphil, Sehnsucht, voidmax, isaf27 under my supervision.

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

Good luck everybody!


Scoring distribution: 500 — 1000 — (1000 + 1000) — 2000 — 2500

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

UPD2: Winners!

Div. 2:

  1. SARS-CoV-2
  2. kvk1920
  3. Crazy_Diamond
  4. KwanghyunOn
  5. pufanyi

Div. 1 + Div. 2:

  1. amnesiac_dusk
  2. jiangly
  3. SARS-CoV-2
  4. wiwitrifai
  5. cookiedoth

UPD3: Editorial

Read more »

Tags 622
  • Vote: I like it
  • +181
  • Vote: I do not like it

By FieryPhoenix, 9 days ago, In English,

Moo! (Hello Codeforces!)

I’m very excited to invite you to Codeforces Round #621 (Div. 1 + Div. 2), which will take place on Feb/17/2020 18:35 (Moscow time).

In this round, you will be helping Farmer John and his prized cow Bessie cowmplete some fun tasks.

The contest will have 7 problems and is combined and rated for both divisions. The duration is 2 hours and 15 minutes. The problems are prepared by me (FieryPhoenix) and dragonslayerintraining. We tried very hard to make them interesting and hope that you will enjoy them too!

This round would not have been possible without the wonderful coordination by adedalic and cdkrot. Thank you so much to the testers as well for all the invaluable advice: tmwilliamlin168, walnutwaldo20, nikolapesic2802, bfs.07, Rods, lynmisakura, JustasLe, and hocky. As always, thanks to MikeMirzayanov for the best systems Codeforces and Polygon.

Good luck and more importantly, have fun and learn something new!

UPD: The scoring distribution is 500 — 1000 — 1500 — 2000 — 2500 — 3000 — 3500

UPD: Editorial

UPD: Thank you for participating! Huge congratulations to the winners!

  1. MiFaFaOvO

  2. 300iq

  3. ohweonfire

  4. yosupo

  5. ksun48

Read more »

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

By djm03178, history, 12 days ago, In English,

안녕하세요, 코드포스! (Hello, Codeforces!)

I'm glad to invite you to Codeforces Round #620 (Div. 2). The contest will start at Feb/15/2020 16:05 (Moscow time), and it is rated for all participants with ratings under 2100.

You will be given 6 problems and one of the problems has 2 subtasks. The contest duration is 2 hours. The score distribution will be announced later.

All problems are prepared by me, with huge help from the testers with developing great solutions.

I'll be on the community Discord server after the contest to share my thoughts and get feedback about the problems.

Thanks to 79brue, molamola., FlowerOfSorrow, evenharder, cs71107, Justice_Hui, rkm0959, chpark1111, imeimi, alswhp, gaelim, jh05013 (Good tester), yuto0518, N_jara, aryanc403, SnowGoose, --Someone--, surung9898, and ko_osaga for testing the round. I would also like to thank 300iq for round coordination, and MikeMirzayanov for the great Codeforces and Polygon system.

Hope you enjoy the problems!

UPD: The scoring distribution is 500 — 1000 — 1500 — 1750 — 2000 — (2000 + 1000)

UPD2: The contest is finished! Thanks so much for your participation! The editorial is here.

UPD3: Congratulations to the winners!

Div. 2

1: ltst

2: COVID-19

3: cosplay

4: sincerity

5: ChitandaEru

Unofficial Div. 1

1: wucstdio

2: ksun48

3: jiangly

4: uwi

5: teapotd

Read more »

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

By SoshkinRoman, 12 days ago, translation, In English,

From 28.01.20 to 07.02.20, Petrozavodsk State University held 38th Petrozavodsk Programming Camp. 47 teams participated in the competition from 33 universities, 25 cities, 11 countries (Russia, Belarus, Kazakhstan, Poland, Romania, Latvia, Ukraine, South Korea, China, USA, Japan)

Petrozavodsk Programming Camp is traditionally a training platform for International Collegiate Programming Contest (ICPC) winning teams: over the past 18 years, 13 times the camp participants became winners in ICPC World Finals. This time from 47 of participating teams 18 teams will take part in ICPC World Finals 2020.

Petrozavodsk Programming Camp consists of nine days of contests and two upsolving days days off between them. One of the camp's features is that participants and sponsors are generally the authors of contests. This time the authors were: 300iq; tourist; MiFaFaOvO; teams from the following universities: SPb SU, Lviv National University, Jagiellonian University, Nizhny Novgorod SU; as well as Yandex team.

The participants enjoyed karting, bowling, and also attended events from partners of the competition: AIM Tech provided beer and snacks to members of AIM Tech Poorly Prepared Contest, Yandex puzzled participants with questions on the Yandex.Quiz, Botan Investments talked about Cyprus AI investor trip, and Huawei gave a lecture about Big Data Algorithms.

Read more »

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

By zscoder, history, 3 weeks ago, In English,

Hello everyone!

Will you be single and bored during Valentine's Day? Never fear, as zscoder is here to cure your boredom.

I would like to invite you to Valentine's Day Contest 2020, which will take place on Friday, February 14, 2020 at 12:30 GMT. The contest is unofficial and unrated, but the quality of most (if not all) of the problems are comparable to problems from a Codeforces round. I am the author of all problems.

The contest format will be IOI format, which means that each problem is worth $$$100$$$ points, and there are subtasks for each problem. There will be no time penalty. The problems are not sorted in increasing order of difficulty. Unlike IOI, you are allowed to use any templates or notes you have.

There are 7 problems to be solved in 3.5 hours. There is an interactive problem, so feel free to learn about them here.

There will be a special shoutout to the first person to AC for each problem (and also the first person to get all 7 ACs >_<).

The difficulty of the contest is aimed at higher-rated Div. 2 (Expert) to mid-red (low International Grandmaster) level participants but everyone is welcome to join the contest. Of course, if you are not single and are still free to join the contest, you are welcome to join as well. XD

Thanks to the testers Kuroni, tmwilliamlin168, duckmoon99, gamegame, ToxicPie9, dorijanlendvaj, kostia244 and alimq for testing the problems and MikeMirzayanov for the wonderful Codeforces and Polygon systems that made this contest possible.

The contest will be held (tentatively) within a Codeforces group and the link will be posted later.

UPD: The contest will be held as a training contest on Gym. (which will appear later) The contest is now available on Gym. Registration opens $$$6$$$ hours before contest starts.

If you are a coach in Gym, remember to disable coach mode before joining the contest. ^_^

I will be on the AC Discord server to discuss the contest after it ends.

Hope to see you in the contest!

UPD 2: Contest is over! Thanks to everyone who participated and made this Valentine's Day less lonely for me. Congratulations to the top 10:

Rank 1: Radewoosh (with 577 points)

Rank 2: jiangly and kefaa2 (tied with 500 points)

Rank 4: NoLongerRed (with 426 points)

Rank 5: sigma425 (with 409 points)

Rank 6: noneTP (with 351 points)

Rank 7: master_rat1 (with 345 points)

Rank 8: chocorusk (with 340 points)

Rank 9: BigBag (with 334 points)

Rank 10: waynetuinfor (with 326 points)

Also, here is a shoutout to all the "first to AC"s:

Problem A: sigma425 at 00:16

Problem B: Unsolved during contest time :(

Problem C: kefaa2 at 00:25

Problem D: TLE at 00:44

Problem E: TLE at 02:38 (and only AC for E during contest!)

Problem F: ForeverAffection at 00:12

Problem G: shirakami.rin at 00:24

UPD 3: The editorial is here!

Read more »

Announcement of Valentines Day Contest 2020
  • Vote: I like it
  • +564
  • Vote: I do not like it

By Medeowex, 13 days ago, In English,

Hello Codeforces.

I would like to invite you to participate in Codeforces Round #619 (Div. 2) which will take place on Feb/13/2020 17:35 (Moscow time).

The contest will be rated for Div. 2 participants. It will include 6 problems, and you have 2 hours to solve them. The problems were created and prepared by me.

I would like to thank KAN, isaf27 for coordinating this round. And 300iq, -is-this-fft-, AdvancerMan, Dup4, Agnimandur, Tzak, DomiKo, Aleks5d, Supermagzzz, manta1130 for testing the round. I also would like to thank MikeMirzayanov for great and perfect Codeforces and Polygon systems.

hope you enjoy the contest and find some interesting problems.

UPD: Score distribution: 500-1000-1250-1750-2500-2500.

The round has ended. Thanks for participating and congratulations to the winners.


  1. MiFaFaOvO
  2. dreamoon_love_AA
  3. LayCurse
  4. wucstdio
  5. neal


  1. COVID-19
  2. kent_nishimura
  3. jxdxhy
  4. Crazy_Diamond
  5. DovydasVad


Read more »

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

By pikmike, history, 2 weeks ago, translation, In English,

Hello Codeforces!

On Feb/12/2020 17:35 (Moscow time) Educational Codeforces Round 82 (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 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!

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

Hello Muscat

Hi Codeforces!

This is not the last call for participation, but we’re almost there. We have extended the early bird discount deadline of Hello Muscat ICPC Programming Bootcamp until this Sunday, February 16th. Remember you can request a support letter to present to your university, employer or local companies to sponsor your participation and trip to the bootcamp.

Register now

We would also like to remind you that if your team is going to the ICPC World Finals in Moscow this June, you can fill out the form below to see if you are eligible for a full scholarship for our Bootcamp (flights not included), and we will contact you within three days to let you know about the results.

Fill out form

UPD: There will be 7 problems in the round

Congratulations to the winners:

Rank Competitor Problems Solved Penalty
1 tmwilliamlin168 7 294
2 Egor 6 173
3 ivan100sic 6 174
4 neal 6 175
5 kefaa2 6 179

39 successful hacks and 147 unsuccessful hacks were made in total!

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

Problem Competitor Penalty
A Muhammad_Hokimiyon 0:01
B icecuber 0:04
C MylnikovNikolay 0:09
D waynetuinfor 0:11
E Mehrdad_Sohrabi 0:17
F wucstdio 1:10
G arknave 0:49

UPD: Editorial is out

Read more »

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