By DmitryGrigorev, 3 days ago, translation, In English,

Hi, Codeforces! I'm glad to invite everybody to the #489 Codeforces Round, which will be held as soon as tomorrow, on Monday, June 18, 2018 at 19:35. The round will be rated for all participants from the second division (with rating below than 2100). As usually, we will be glad to see participants from the first division out of competition!

Problems for the round have been invented and prepared by us, pupils of Moscow school №2007, Dmitry DmitryGrigorev Grigorev and Fedor ushakov.fedor Ushakov. We want to give thanks to Andrew GreenGrape Raiskiy for his aid in preparing and testing of the problems, to Ildar 300iq Gainullin and to AmirReza Arpa PoorAkhavan who have tested our problems too and to the coordinator Nikolay KAN Kalinin, since our sometimes strange and undeveloped ideas have become eventually the Codeforces round. Also, we say thank you to Mike MikeMirzayanov Mirzayanov for his unbelievable Codeforces and Polygon platforms.

You will receive 5 problems and 2 hours for solving it. During the round you will be helping for an extraordinary girl Nastya, who has been living in Byteland and sometimes receives very strange gifts for her birthday :).

Score distribution will be announced, traditionally, closer to the start of the contest.

We're holding our the first and, I hope, not the last round in Codeforces, so I hope a lot you will like our problems. Please, read all the problems. Anyway, I wish luck and high rating for all the participants!

I'm looking forward your participation.

UPD Score distribution is standart — 500-1000-1500-2000-2500

UPD2 Thank you for your participation in the contest! It's very-very pleasant for me if you like the problems, and I'm sorry if you don't :) I hope the next my contest will be even better, than this. Thank you for all!

List of the winners of the contest:


  1. sminem

  2. guIRELItAr

  3. YaDon4ick

  4. q-O_O-p

  5. pajenegod

Div.1 + Div.2

  1. dotorya

  2. Benq

  3. anta

  4. sminem

  5. kevinsogo

My frank congratulations for all the winners!


Editorial is here

Read more »

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

By ItsNear, history, 7 days ago, In English,

UPD note that the score distribution has changed

UPD2: LHiC found a bug in the author solution of div1-F. We are working on the situation.

UPD3: we found a correct solution for div1-F and both submissions made during the contest pass all the tests against the correct solution. The round remains rated.

Hi, everybody,

Codeforces round 488 for both divisions will take place on Jun/16/2018 19:35 (Moscow time). The round will be 2.5 hours long (which is 30 minutes longer than usual).

The contest is created by NEAR and its friends. NEAR is working on teaching machines to compete in programming competitions. Read our blog post to learn more about the state of the art in the program synthesis today, our vision, and how you can help us bring this vision to reality.

The contest will feature 6 problems for each division, with 4 problems shared across them.

The problems for the contest are from the test rounds hosted on a system JavaBlitz last year. If you participated in any of the JavaBlitz rounds, you shall not participate in this round.

The score distribution in the first division is 500-1000-1000-1500-2250-3000

In the second -- 500-1000-1500-2000-2000-2500

The round is rated for both divisions.

All problems are initially created by myself, Alexander "ItsNear" Skidanov, and by Nikita "neckbosov" Bosov. David "pieguy" Stolp, Alexander "AlexFetisov" Fetisko, Marcelo "MarX" Fornet, Nikolay "KAN" Kalinin and Mikhail "cerealguy" Kever helped tremendously ensuring the high quality of the problems.

As a closing note, we are constantly looking for people to help us label competitive programming data for research. Read more here.

Congratulations to winners!

Div. 1:

  1. Um_nik
  2. Errichto
  3. scott_wu
  4. Reyna
  5. matthew99

Div. 2:

  1. FiveAtomTree
  2. shayan.p
  3. gauss148
  4. kessido
  5. codejudge

The editorial is published here. Thanks for your participation!

Read more »

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

By cyand1317, history, 10 days ago, In English,

Here and there, summer's in the air! (I beg your forgiveness, residents of the Southern Hemisphere... > <)

I'm delighted to invite you to Codeforces Round #487 (Div. 2), which starts at Jun/11/2018 16:35 (Moscow time). Please note that the timing is, as usual, unusual.

This is my third time creating a contest from scratch. Along the way can be seen the efforts of: KAN the super-ultra-hyper-mega-meta coordinator, who has reviewed, refined and translated the problems; 300iq, Livace, mike_live, Noam527, RobeZH, and Tommyr7 the super-ultra-great-delicious-wonderful testers, that have populated our collection of solutions; and MikeMirzayanov along with the super-ultra-extreme-awesomazing Codeforces/Polygon team, who have made all these happen in the way it is! Kudos to all of you!

The round will be rated for contestants from the second division, and the first division are welcomed as out-of-competition participants. There will be five problems to work on for two hours. The scoring distribution will be announced later, because of... love.

Despite my illiteracy, I included the stories in the hope that they'll be inspiring to some; feel free to skip them, if you'd like to fully concentrate on problems themselves.

We wish everyone a fun experience and a fair rating. We'll be pleased to have you on the contest!

Gone are the freshness and beauty of springtide, which raises the downheartedness in Mino the poet, as in many other poets. Mino's best friend, Kanno the painter, however, is intrigued by the changing palettes brought about by the seasons. On this day, their journey in search of spring begins...

UPD 1 The scoring is standard: 500–1000–1500–2000–2500. It's however strongly recommended to read other problems if you're stuck, since you may not necessarily find later problems harder. Good luck!

UPD 2 Congratulations to top contestants! Also big kudos to all participants!

Div. 2 Top 5

  1. olphe
  2. jorik
  3. rahuldugar
  4. UtahaS3npai
  5. espr1t

Overall Top 5

  1. olphe
  2. mjhun
  3. Inner_x_Peace (First to solve E!)
  4. kobae964 (_That_ close! Integer division, maybe?)
  5. jorik

UPD 3 The editorial is out, see you there!

Read more »

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

By PikMike, history, 11 days ago, In English,

Hello Codeforces!

On Jun/10/2018 13:05 (Moscow time) Educational Codeforces Round 45 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 extented ACM ICPC rules. 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 Adilbek adedalic Dalabaev, Roman Ajosteen Glazov, Ivan BledDest Androsov, Mike MikeMirzayanov Mirzayanov and me.

Good luck to all participants!

Congratulations to the winners:

Rank Competitor Problems Solved Penalty
1 KrK 7 225
2 isaf27 7 231
3 BigBag 7 325
4 Motarack 7 327
5 TangentDay 7 331

Congratulations to the best hackers:

Rank Competitor Hack Count
1 halyavin 202:-52
2 2014CAIS01 26:-2
3 djm03178 20
4 19
5 antguz 25:-17
549 successful hacks and 525 unsuccessful hacks were made in total!

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

Problem Competitor Penalty
A tzuyu_chou 0:01
B DoomzDay 0:05
C 562225807 0:08
D teja349 0:12
E eddy1021 0:18
F nhho 0:45
G AChen142857 0:14

UPD: Editorial is out

Read more »

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

By kuviman, 11 days ago, translation, In English,

Hello everyone!

You might have noticed a new link in the main menu (top) already. Here you can see top-10 most interesting/discussed blog entries in recent time.

Here is some info on how we decide which posts to show on that page. First, we filter only those post which have some activity (comments/positive votes) in recent time, and each comment/vote has a weight that depends on its time. The newer the post/comment/vote is, the stronger effect it has on the post for getting into the top.

Thanks for you attention! :)

Read more »

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

By fcspartakm, history, 13 days ago, translation, In English,

Hello, Codeforces. Below you can see the improvements in the system Polygon.

A lot of work has been done to simplify the preparation of school tasks, which use groups and points for tests. In the General Information tab, you can enable the points option for each test. This option is enabled points for the whole problem, that is, for tests from all testsets. Let me remind you that test groups can be enabled for each testset separately on the Tests tab.

Points for groups, points policies, dependencies

Points for the test, as well as groups, can be entered in the table with the list of tests, and also specify them when creating a new test. If the group for the test appears for the first time, it will be automatically added to the list of available groups. This list is presented in the table.

Read more »

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

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


Codeforces Round #486 (Div. 3) will start on June 1 (Friday) at 14:35 (UTC). It will be the third Div.3 round in the history of Codeforces. You will be offered 6 problems 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.

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 Maksim Ne0n25 Mescheryakov and Ivan BledDest Androsov for testing the round.

UPD: I also would like to thank step_by_step and eddy1021 for testing the round and help with it preparation!

UPD2: You will be given 6 problems and 2 hours to solve them.

UPD3: Editorial is published. Thanks to Mikhail PikMike Piklyaev for the help with translation.


Congratulations to the winners (official results):

Rank Competitor Problems Solved Penalty
1 volamtruyenkyii 6 196
2 IOI2018 6 238
3 Student_of_Husayn 6 303
4 Omoshiroi_ 6 311
5 Deadpool 6 313
6 AHDPIYKO 6 341

Congratulations to the best hackers:

Rank Competitor Hack Count
1 jhonber 70:-1
2 djm03178 61:-4
3 applese 53:-1
4 WAI95 41:-3
5 step_by_step 38:-5
6 greencis 57:-45

530 successful hacks and 401 unsuccessful hacks were made in total!

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

Problem Competitor Penalty
A AhmedMohamd-BeatMeIFUCAN 0:02
B S1mplest_gu1 0:06
C S1mplest_gu1 0:12
D volamtruyenkyii 0:23
E Ycrpro 0:19
F MuieEcaterina 0:49

I hope that you will like the problems. If the problems in this round are too easy or too hard, then we will adjust the difficulties in the next Div. 3 rounds.

Good luck!

Read more »

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

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


I'm glad to invite you all to Round 485 which will take place on Tuesday, May 29 at 18:35 UTC+3.

There will be 6 problems in each division, 3 of them are shared between divisions. 2 of div.2 problems created by KAN, 7 others created by me. The contest duration is 2 hours. My problems were originally used in HSE Championship.

I would like to thank Merkurev and GlebsHP with whom I discussed the problems, I_love_Tanya_Romanova for testing, KAN for round coordination and Codeforces and Polygon team for these beautiful platforms. I would also like to thank HSE for organizing the event. Oh, and kb. for writing great legend for one of the problems (he will be surprised).

For those who for some reason like to know score distribution in advance:
div.2: 500 — 1000 — 1250 — 1750 — 2250 — 3000
div.1: 500 — 1000 — 1750 — 2500 — 2750 — 3000
But I didn't properly discuss it with KAN so this is subject to change :)
UPD: Discussed with KAN, scores for C and D in div.2 increased by 250.

Good fun, have problems, read all the luck. As usual.

Oh, and if there will be no bad things, round will be rated. I hope.

I'm very sorry for issues with queue. I understand that it could ruin the contest for many of you. But please be understanding. Bad things happen. It could be some network problems or some electricity problems. MikeMirzayanov, KAN and other people behind Codeforces trying their best to provide good service. But sometimes it's very hard for some reasons. I hope that you enjoyed the problems despite all the bad things.

We decided that round will be rated.

Editorial will be posted tomorrow.

div.1 winners:
1. tourist
3. Radewoosh
4. mcfx
5. LHiC

div.2 winners:
1. sminem
2. Fortza_Gabi_Tulba
3. cheburazshka
4. I_Love_KFC
5. CantGetAnyWaWhyImSoSmart

Editorial is up.

Read more »

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

By 300iq, 4 weeks ago, translation, In English,


I'm glad to invite you to take part in Avito Code Challenge 2018 which starts on May/27/2018 17:50 (Moscow time). Any participant can join the round and it will be rated for each participant. Hope to see you among the participants!

Problems are prepared by me — Ildar Gainullin.

This round is conducted on the initiative and support of Avito. is a Russian classified advertisements website with sections devoted to general good for sale, jobs, real estate, personals, cars for sale, and services. is the most popular classifieds site in Russia and is the third biggest classifieds site in the world after Craigslist and the Chinese website

Many thanks to Vladislav winger Isenbaev, Grigory gritukan Reznikov, Ivan isaf27 Safonov,Alexander AlexFetisov Fetisov and Shiqing cyand1317 Lyu for the round testing, Nikolay KAN Kalinin for helping me to prepare the contest, and also to Mike MikeMirzayanov Mirzayanov for systems Codeforces and Polygon.

Participants will be offered eight problems and three hours to solve them. Scoring will be announced a bit later.

Avito presents nice gifts for participants. Top 30 participants and also 10 random participants with places 31-130 will be awarded with a special T-shirt.

I hope everyone will find interesting problem for themselves. Wish everyone a successful round and high ratings!

Good luck!

UPD,Scoring: 500 750 1250 1750 2250 2750 3250 3750

UPD,Editorial is ready: Editorial!

The winners of random t-shirts are:

List place Contest Rank Name
6 981 36 snuke
31 981 61 Swistakk
40 981 70 yasugongshang
52 981 82 Xellos
62 981 92 shadowatyy
76 981 106 BudAlNik
80 981 110 kostka
88 981 118 pb0207
95 981 125 Noam527
96 981 126 xiaowuc1

Read more »

Announcement of Avito Code Challenge 2018
  • Vote: I like it  
  • +575
  • Vote: I do not like it  

By MikeMirzayanov, 4 weeks ago, translation, In English,

Hello, Codeforces!

I offer you also to join testing of HTTPS support. Just visit to and start to use the website through HTTPS.

I am aware of some minor issues: mails still refer to the HTTP version of the website, Facebook does not merge likes for HTTP and HTTPS. Have you noticed anything else? Write a comment!

And thanks to Let's Encrypt for the certificates. Now with wildcards!

Read more »

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