By Vovuh, history, 6 weeks ago, translation, In English,


Hello! Codeforces Round #565 (Div. 3) will start at Jun/09/2019 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. Probably, participants from the first division will not be at all interested by this problems. And for 1600-1899 the problems will be too easy. 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 Mikhail PikMike Piklyaev, Maksim Ne0n25 Mescheryakov and Ivan BledDest Androsov for help in round preparation and testing the round.

Good luck!

I also would like to say that participants who will submit wrong solutions on purpose and hack them afterwards (example) will not be shown in the hacking leaders table.


UPD1: Big thanks to Um_nik, Rudy358, nigus, opukittpceno_hhr and Temotoloraia for testing the round! And also big thanks to my dear friends Ivan BledDest Androsov, Roman Roms Glazov and Mikhail PikMike Piklyaev for help with round preparation!

UPD2: Editorial is published!


Congratulations to the winners:

Rank Competitor Problems Solved Penalty
1 Yushen 6 235
2 Violet_user 6 293
3 BudiArb 6 345
4 xenoframium 6 350
5 njchung93 6 439

Congratulations to the best hackers:

Rank Competitor Hack Count
1 nikolapesic2802 69:-15
2 stefdasca 42:-11
3 dorijanlendvaj 15:-11
4 orz_liuwei 10:-11
5 interestingLSY 5:-1
170 successful hacks and 236 unsuccessful hacks were made in total!

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

Problem Competitor Penalty
A riz_1_ 0:02
B _ekaterina_dudina 0:04
C BudiArb 0:05
D hxylalala 0:18
E csts.21 0:17
F njchung93 0:32

Read more »

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

By ouuan, history, 7 weeks ago, In English,


We are glad to invite you to take part in Codeforces Round #564 (Div. 1) and Codeforces Round #564 (Div. 2), they will be held on Jun/07/2019 15:05 (Moscow time). The round will be rated for both divisions.

Participants in each division will be offered 6 problems and 2 hours to solve them, including 4 shared problems for both divisions, and one of them has two versions with the only difference in constraints.

The problems were written and prepared by me, Sooke, QAQAutoMaton, ODT, ccz181078, rushcheyo and PinkRabbit.

Great thanks to 300iq for coordinating and testing the round, we enjoyed the experience of preparing a round with him.

Thanks to Um_nik, KAN, isaf27, xht37, ButterflyDew and DKACVenus for testing the round, too.

Of course, thanks to MikeMirzayanov for amazing systems Codeforces and Polygon!

Last but not least, thanks to everyone who participates in this round, for making our efforts meaningful.

Both English and Chinese editorials will be available after the contest.

UPD 1: The scoring distribution will be:

  • Div.2: 500 — 1000 — 1500 — 1750 — (1250 + 1250) — 2750

  • Div.1: 500 — 750 — (750 + 750) — 1750 — 2500 — 2750

UPD 2: Congratulations to the winners!


  1. CauchySheep

  2. maroonrk

  3. WA_TLE

  4. zeronumber

  5. nhho


  1. foreverlasting

  2. wifiiiiii

  3. liuxiao

  4. Joysh

  5. YenSean

UPD 3:

The English Editorial and the Chinese Editorial are published.

Read more »

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

By MiptLited, 7 weeks ago, translation, In English,

This season is promised to be exciting! It's high time to start preparing for the ICPC World Finals 2020 in Moscow. Follow our website to check the registration updates.

We are opening registration for the Discover Grodno programming workshop to prepare for the ICPC season. From 7 to 14 of July we invite students of B and C divisions to Belarus! The camp will be held at the Yanka Kupala State University of Grodno. Apply now to get the lowest price and request the payment bill if your university or sponsor would like to pay for you.

As you remember July 6 — 13 we will meet in the beautiful city of Vladivostok at the Discover Vladivostok Workshop. Registration is open for A, B, and C divisions! Students will study on the Far Eastern Federal University campus. Apply now and request the payment bill asap to get the lowest price and other bonuses.

What else is coming up?

  • September, 7-14: Baikal, Russia (Div. C, D)
  • September, 21-28: Singapore (Div. А, В/С)
  • October, 5-13: Riga, Latvia: (Div. А, В/С)
  • November, 5-14: Moscow International Workshops ICPC (Div. A, B)
  • April: Moscow Pre-finals Workshop ICPC (Div. A, B)

Looking forward to see you soon!

Read more »

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

By PikMike, history, 7 weeks ago, translation, In English,

Hello Codeforces!

On Jun/05/2019 17:35 (Moscow time) Educational Codeforces Round 66 (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 participants!


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

Codeforces! What is the next step in your development?

We understand all about doing things by yourself — after all, we are a startup university, and our student body is exceptional in part because of it’s made up of people who didn’t wait for anyone to show them the way.

If this is you, you belong at Harbour.Space. The purpose of our University is to create a global community of these kinds of people, regardless of age or nationality, because when you’re working by yourself, you can change for the better, but when you work with others, you can change the world.

If you believe you have what it takes, we want you!

The curriculum is part of what makes the modules so special, and the other half? Our outstanding teachers who are leaders in their own respective industries.

Our scholarships are set in such a way that doesn’t require additional applications — we believe in merit and potential, and so what you put in your application to the university will be our criteria.

You could be just the diamond we’re looking for, but you’ll never know unless you apply!


Congratulations to the winners:

Rank Competitor Problems Solved Penalty
1 mango_lassi 6 145
2 E869120 6 148
3 kefaa2 6 154
4 egor.lifar 6 154
5 Aria 6 157

Congratulations to the best hackers:

Rank Competitor Hack Count
1 Radewoosh 97:-19
2 test_hack 56:-37
3 alvinvaja 30:-10
4 AryaKnight 48:-48
5 nikolapesic2802 30:-14
779 successful hacks and 1077 unsuccessful hacks were made in total!

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

Problem Competitor Penalty
A Geothermal 0:01
B mango_lassi 0:05
C nuip 0:07
D Yushen 0:04
E Sehnsucht 0:20
F osaaateiasavtnl. 0:05
G LgndryGrandmasturbator 0:47

UPD: The editorial is out

Read more »

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

By mohammedehab2002, 7 weeks ago, In English,


I'm back with not one, not two, but three contests, although I have no promises about when to expect them....

The first of them, codeforces round #563, will take place on Jun/03/2019 17:05 (Moscow time). It's rated for the second division, but, as usual, first division participants can take part out of competition.

I'm the problemsetter of the round. I'd like to thank KAN for coordinating the round (and his patience .. try coordinating ~20 problems), arsijo for helping with the preparation, Um_nik, opukittpceno_hhr, Aleks5d, Rifai, pllk, ulna, Ivan19981305, and PrianishnikovaRina for testing the round, and MikeMirzayanov for the great codeforces and polygon platforms.

In this round, you'll be given 6 problems and 2 hours to solve them.

UPD: I decided to drop the 3 seconds rule. The scoring distribution is 500-1000-1500-1750-2500-2500. That means you should probably read both E and F :D

Good luck & Have fun!

UPD: here's the editorial.

UPD: congratulations to the winners!


  1. oxytocyna
  2. E869120
  3. 800iq
  4. cerberus97
  5. Anadi


  1. 800iq
  2. Alex18mai
  3. Mikaeel
  4. prick
  5. wasyl

See you in the second round :D

Read more »

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

By egor.lifar, 7 weeks ago, translation, In English,


On Jun/01/2019 17:35 (Moscow time) we will host Codeforces Global Round 3.

It is the third round of a new series of Codeforces Global Rounds supported by XTX Markets. The rounds are open for everybody, the rating will be updated 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 2019:

  • 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.

The problems of the round were developed by me, egor.lifar and UnstoppableSolveMachine. We are glad to say that we have prepared 8 tricky tasks for you. We hope you will enjoy them!

Thanks to KAN and _kun_ for the help with coordinating the round, and cookiedoth, lewin, voidmax, 300iq, Aleks5d, Learner99, Jeel_Vaishnav, arsijo, KAN, Ashishgup, AlexFetisov, V--gLaSsH0ldEr593--V for testing!

Good luck!

UPD. 1:

Here are a few words from the sponsor of Global Rounds, XTX Markets.

Hello, I’m Yuri Bedny from XTX Markets! While studying at university I actively took part in programming contests and later got to apply these skills at XTX Markets. Our office in London (UK) is looking for candidates for two open positions. We hope it will be interesting for some of you to apply your skills and knowledge in problems we are solving. I wish good luck to all the participants and hope you’ll enjoy the problems.

Open positions at XTX:

  • XTX Markets is looking to expand its Java team. You’d be expected to be able to design low-level data structures and algorithms to fit particular performance characteristics. We have a direct impact on profits and very little bureaucracy and are open to candidates with no financial experience. Read the details via the link.
  • XTX Markets is hiring into its Core Development team in London. This team is responsible for the design and implementation of the platform that provides a broad range of post-trade functionality essential to the firm’s business. This complex, distributed system has been developed in-house using a distributed microservices architecture to provide high throughput (thousands of trades per second) and high availability (24x7 operation) while also allowing very agile but well-controlled development practices (multiple production releases per day). The system is implemented primarily in Go, but prior Go experience is not required for those willing and able to learn quickly. The only necessary skills are exceptional programming ability, a passion for solving real-world problems, and a dedication to rigorous software engineering. Read the details via the link.

If you are interested in these positions, then fill out the application form via the link or during registration for the competition.

UPD. 2:

The scoring distribution will be 500 — 1250 — 1500 — 1750 — 2250 — 3000 — 4000 — 4000. The round will last 2 hours and 15 minutes.

UPD. 3:

Current results of all Global Rounds.

Congratulations to the winners!

  1. mnbvmar
  2. tourist
  3. Petr
  4. yutaka1999
  5. LHiC
  6. Egor
  7. ksun48
  8. sunset
  9. krijgertje
  10. kczno1

UPD. 4:


Read more »

Announcement of Codeforces Global Round 3
Announcement of Codeforces Global Round 3
  • Vote: I like it
  • +121
  • Vote: I do not like it

By Radewoosh, history, 2 months ago, In English,

Hello, codeforces!

Long time no see, right? So maybe it's a good idea to try to return to my blogs slowly. This time the blog will be about a trick, which usually isn't necessary to solve a task, but can be useful to make implementation much more comfortable.

Let's look at this problem. It is about some DP on a tree in which we have to use convex hull trick to improve the complexity. The task requires merging two convex hulls with "smaller to bigger" trick. I recommend you to read the statement before reading the rest of the blog (and the editorial if you don't know how to solve it).

Read more »

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

By JetBrains, 2 months ago, In English,

Hello, Codeforces!

We are happy to announce that in partnership with Codeforces to promote Kotlin programming language we are launching a series of "Kotlin Heroes" programming contests.

Kotlin programming language was introduced by JetBrains in 2011 and reached its first stable version 1.0 in 2016. The current language version is 1.3.31. The language is focused on solving the needs of application developers in various domains. Kotlin is a statically typed language that is designed for writing concise code, with less ceremony and more substance in it, and to scale from applications of just a few lines long to multi-million-lines projects.

While not being specifically designed for competitive programming, it incidentally fits well in this domain, reducing the typical amount boilerplate that a programmer needs to write and read while working with the code almost to the level offered by dynamically-typed scripting languages, while having tooling and performance of a statically-typed language.

The first "Kotlin Heroes" competition will be hosted at Codeforces platform on May/28/2019 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 badge, competitors solving at least one problem will enter into a draw for one of 50 Kotlin Heroes t-shirts.

The round is held in accordance with slightly modified ICPC rules:

  • The round is unrated.
  • The contest will have 6-10 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).

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


To help you get familiar with Kotlin we have prepared a tutorial on competitive programming in Kotlin and a practice round, where you can try to solve a few simple problems in Kotlin. All solutions are open, it means that you can look at a solution even if you haven't solved a problem yet. The practice round is available by the link.

We wish you luck and hope you enjoy Kotlin.

UPD 1: Many thanks to the testers elizarov, Benq, _kun_, nhho, ksun48. Also KAN helped a lot with suggestions to the problems. And to all the participants warm greetings from authors MikeMirzayanov, Vovuh, adedalic and pashka — they invented and prepared the problems for you!

Read more »

Announcement of Kotlin Heroes
  • Vote: I like it
  • +280
  • Vote: I do not like it