By Akikaze, 5 days ago, In English,

"Can you hear me?"


Hello Codeforces!

We are here to invite you to Codeforces Round #614 (Div. 1) and Codeforces Round #614 (Div. 2), which will take place at Jan/19/2020 16:35 (Moscow time). The round is rated for both divisions.

This is our first round including Div.1 parts, hopefully you'll find the problems interesting. ;)

This round is themed based on the Rayark Inc.'s rhythm game, "Cytus II". You are about to help our characters in various problems, whether inside or outside of the virtual Internet! Also, feel free to listen to the music tracks I've chosen from the game for each problem (and later, editorial!). ;)

Each division will be given 6 problems to solve in 2 hours. The round's problems were prepared by Xuan-Quang xuanquang1999 D. Nguyen, Duy-Bach Akikaze Le and Tuan-Dung low_ To.

Interactive problem(s) might be found in this round. Learn about them here.

We also want to thanks our friends for helping this contest being possible:

Last but not least, I want to give a huge appreciation to MikeMirzayanov for the awesome Codeforces and Polygon platform, which makes this contest possible.

Wish everyone good luck and high rating!

UPD1: Editorial is available here.

UPD2: Many more testers helped us in this round! Huge thanks to Kevin ksun48 Sun, Andrew ecnerwala He, Aydar aid Sayranov, Nikolay KAN Kalinin, Oleg Mustang98 Vallas, Mohammed mohammedehab2002 Ehab, Artem Rox Plotkin, Mingming Nero Zhang, Darko Aleksic, Ilya IlyaCK Porublyov, NatInTheHat and NIWIS!

UPD3: Score distribution:

  • Div. 1: 500-750-1250-1750-2250-2750
  • Div. 2: 500-750-1250-1500-2000-2500

UPD4: True editorial is available here!

UPD5: The contest is over. Thanks for participating, and here are the winners:

  • Div. 1:
  1. Um_nik (first to solve C and F)
  2. tourist (first to solve A, B, D and E)
  3. Benq
  4. HIR180
  5. jiangly
  6. TLE
  7. AprilGrimoire
  8. Golovanov399
  9. cz_xuyixuan
  10. fateice
  • Div. 2:
  1. DestinyFucker9000 (solved all Div.2 problems!)
  2. about
  3. Isaunoya
  4. espr1t
  5. kkktl01
  6. the_happy_camel
  7. changruinian2020
  8. Agarifighter
  9. Small_Pax
  10. TaeHooooon

Also, as the direct setter of Div1B/Div2D, I sincerely apologized for the weak testsets. I must admit, I underperformed this time, and might cause some of you inconvenience. Hope to see you guys another time with a better contest.

Read more »

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

By pikmike, history, 6 days ago, translation, In English,

Hello Codeforces!

On Jan/14/2020 17:35 (Moscow time) Educational Codeforces Round 80 (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 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!

As a special prize for the Educational Round 80, we would like to invite the top 3 participants to take part in our Hello Muscat ICPC Programming Bootcamp, which will take place in Oman, from March 19 to March 25, 2020. The prize will cover the participation fee, accommodation, and half-board meals for the entire duration of the bootcamp (except flights)!

There are three requirements to satisfy:

  • You took part in at least 10 rated contests on Codeforces
  • Your max rating should be less than 2400
  • You should be eligible for ICPC and/or IOI 2020+
Fill out the form→

Good luck to everyone!

Note: If you really want to participate, but cannot afford the participation fee, get in touch with us to request a supporting letter for you to show to your university, employer, or local companies. With this letter, you are opening the possibility of being sponsored by them to attend the bootcamp.

Please fill out this form and we’ll send you the support letter within 3 days!

Congratulations to the winners:

Rank Competitor Problems Solved Penalty
1 isaf27 6 150
2 FSTForces 6 167
3 jiangly 6 178
4 ko_osaga 6 179
5 jhnan917 6 184

Congratulations to the best hackers:

Rank Competitor Hack Count
1 surung9898 59:-2
2 ya_ne_xoxol_ya_kiborg 35:-1
3 B2ej5SjC 30
4 spectre_1502 21:-1
5 Dilemma27 20:-4
434 successful hacks and 746 unsuccessful hacks were made in total!

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

Problem Competitor Penalty
A okwedook 0:01
B neal 0:04
C ko_osaga 0:06
E peach 0:17
F jiangly 1:13

UPD: The editorial is out

Read more »

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

By MikeMirzayanov, 9 days ago, In English,

Hello, Codeforces.

Sorry, but for a reason independent of Codeforces, we are forced to cancel the round. It was planned as a mirror of an onsite-olympiad, but suddenly it turned out that this would not work.

We will try our best to please you with other rounds. Stay tuned!

The round Educational Codeforces Round 80 (Rated for Div. 2) will start on Jan/14/2020 17:35 (Moscow time). Hope to see you as a participant!


Read more »

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

By Osama_Alkhodairy, 11 days ago, In English,

Hello Codeforces!

We are glad to invite you to Codeforces Round #613 (Div. 2), which will be held on Jan/10/2020 17:05 (Moscow time). The round is rated for Div. 2 contestants. There will be six problems with a duration of 2:15

The problems were prepared by me, mohammedehab2002, DeadPillow, and MikeMirzayanov.

I'd like to thank pikmike for coordinating the round, dorijanlendvaj, aryanc403, Ari, ZeroAmbition, defolaut, Pavlova, mahmoudbadawy, zoooma13, Mohammad_Yasser, Rox, and BledDest for the invaluable testing, and MikeMirzayanov for great Codeforces and Polygon systems.

Good luck!

UPD1: We decided to add one more problem and extend the duration to 2:15 to make the contest more balanced.

UPD2: Score distribution: 500-1000-1250-1750-2250-3000

UPD3: Editorial is out.

UPD4: Thanks for participating! Congratulations to the winners:

Div. 1 (unofficial) participants

  1. Benq
  2. tzuyu_chou
  3. Andreikkaa
  4. neal
  5. mango_lassi

Div. 2 participants

  1. fmota
  2. FSTForces
  3. yet_another_ATS
  4. iwasa
  5. DP_I_J_K_L_M_N_O

Read more »

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

By Jatana, 2 weeks ago, translation, In English,

Hello everybody!

Now the winter SIS (Summer Informatics School) is taking place, and we, as part of the parallel A*+ with its teachers, have prepared a complete Codeforces Round.

The round will happen at Jan/05/2020 17:05 (Moscow time) and will last for 2 hours. There will be 6 problems in each division.

The tasks of the round were invented and prepared by ismagilov.code, devid, Volkov_Ivan, Jatana, karasek, polinarria, cookiedoth, AlesyaIvanova, doktorkrab, AliceG, D.Pavlenko, VFeafanov, LordVoidebug, forestryks, Ilistratov, seiko.iwasawa, DeadInsideOnTest993, Drozd_off under the guidance of teachers PavelKunyavskiy, VArtem, _meshanya_, Nebuchadnezzar.

Thanks aneesh2312 MarcosK Stepavly Infinity25 tourist antontrygubO_o isaf27 fedoseev.timofey, Kurpilyansky, grikukan for testing!

And, of course, thanks to MikeMirzayanov for great systems Codeforces and Polygon, and 300iq for round coordination.

Good luck everybody!


In problem E an error was made in the intended solution, an overflow of long type while calculating the answer. The first test, on which it happened, reached 4 participants (ainta aid Um_nik ecnerwala), among who two passed the pretests, and two others did not, though they should have. In automatic mode, it is not possible to test so that both answers are accepted, because the overflow changes the tests because of the way the requests are encrypted. So, we decided to test two pretest solutions on the old set of tests and the rest on the new one. As a result, three of the solutions passed the tests (congratulations!), and one received WA80 on the 17th answer inside the test, which is clearly not related to the overflow problems. Only the solution that takes into account the overflow problem can be used in upsolving.

UPD: Editorial!

Read more »

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

By Harbour.Space, history, 2 weeks ago, In English,

Hello, Codeforces!

We are thrilled to announce the second instalment of our Hello Muscat ICPC Programming Bootcamp, organized by Harbour.Space University in collaboration with Codeforces, ITMO University, GUtech University, and our local partner: Phaze Ventures. The Bootcamp’s main sponsor is British Petroleum (BP), supporting Oman’s national priorities: youth development, economic diversification and job creation.

We are also excited to let you know that Codeforces has become the main collaborator of Harbour.Space for our programming bootcamp series, and will be in charge of all the educational content, from contests to problem analysis and lectures, bringing the online legacy of the platform to a unique offline experience.

Hello Muscat will take place during 19 – 25 March 2020 and will feature ICPC world champions and finalists as well as legendary names from the field of competitive programming:

Mike MikeMirzayanov Mirzayanov, Nikolai KAN Kalinin, Andrey andrewzta Stankevich, Artem VArtem Vasilyev, Mikhail darnley Dvorkin, and more coaches to be announced soon!

The bootcamp will be available to teams of different skill levels, separated by two divisions of difficulty:

  • Division B: Designed to help teams prepare for the next season of ICPC regional competitions.
  • Division C: Designed for newcomers to the world of ICPC competitive programming. This division is the perfect starting point for those with a handle on the basics but who want to compete in future competitions and possible regionals.

Single participants and teams must register before January 30th to receive the 15% off Early Bird Discount.
Universities and individual participants that took part in our previous bootcamps and who register for this edition will receive the 20% off Loyalty Discount.

That’s all from us. Head over to our webpage to find out more, and see you in Muscat!


Read more »

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

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

Hi everyone!

This summer I gave another contest in summer Petrozavodsk programming camp and (although a bit lately) I want to share it with codeforces community by adding it to codeforces gym: 2018-2019 Summer Petrozavodsk Camp, Oleksandr Kulkov Contest 2. To make it more fun I scheduled it on Sunday, 5 january, 12:00 (UTC+3). Feel free to participate during scheduled time or, well, whenever you're up to. Good luck and have fun :)

Problems might be discussed here afterwards, I even may write some editorials for particular problems (per request, as I don't have them prepared beforehand this time).

UPD: 17h reminder before the start of the contest

UPD2: It wasn't an easy task to do, but I managed to add ghost participants to the contest! Enjoy!

Read more »

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

By ko_osaga, 3 weeks ago, In English,

새해 복 많이 받으세요, 코드포스! (Happy new year, Codeforces!)

Welcome to the first Codeforces Round of the new decade, Hello 2020! The round will be held on Jan/04/2020 15:05 MSK.

Some information about the round:

  • Div 1, 2 combined
  • 2.5 hours!
  • 7 problems!
  • No subtasks!
  • Score distribution: 500-1250-1750-2500-2750-4000-4000
  • Yes, it is rated!

This round is prepared by ko_osaga nong ckw1140. I am personally very thrilled to deliver my first Codeforces contest as such a memorable one!

More credits for the contest:

UPD: Editorial. Thank you for your participation!

UPD2: Winners:

  1. mnbvmar
  2. TLE
  3. Benq
  4. tourist
  5. gamegame
  6. grumpy_gordon
  7. dario2994
  8. yosupo
  9. Marcin_smu
  10. kczno1

Read more »

Announcement of Hello 2020
  • Vote: I like it
  • +1231
  • Vote: I do not like it

By MikeMirzayanov, 3 weeks ago, In English,

I am happy to wish you a Happy New Year! I wish you a great, bright, interesting New Year! Just believe that it can become so: difficulties will be left behind, and ahead of you will be a joy of victories and discoveries.

I wish all of us new interesting problems, records and achievements! Set new goals and be sure to try to achieve them! And do not go far, we will try to make your 2020 year more fun!

I thank with all my heart for the contribution to the community of coordinators, problem writers, testers, and those who wrote interesting posts and comments. Many thanks to the sponsors, partners and customers: you help the community not to stand still, give the opportunity to hold interesting events. Thanks to all visitors to the website and just not indifferent.

See you in the new year!


Read more »

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

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


It seems to me that over the past few years I have been writing something right while all normal people are celebrating the New Year. It's my tradition now! Actually, most of the core functionality of Codeforces was written on the New Year holidays of 2010: authorization, blogs, basic support for competitions.

Perhaps I want to spend the next year with interest improving something in the Codeforces infrastructure (yep, how you celebrate the New Year — so you will spend it). Or maybe it's just that it's not necessary to work on New Year's and I'm doing not what you need right now, but what would be nice to do someday.

This time I took a little time to add support for parsing command line parameters in testlib. I really don't like to write such lines of code int n = atoi(argv[3]); in generators. Actually for several reasons:

  • it is unsafe that the 3rd command line parameter may be absent;
  • It is unsafe that the 3rd command line parameter may not be a valid 32-bit integer.

Now, instead, you should write this: int n = opt<int>(3);. In addition, you can write like this int64_t m = opt<int64_t>(1); or bool t = opt<bool>(2); or even string s = opt(4);.

In addition, I supported named parameters. If there are too many parameters, then the entry g 10 20000 a true is less readable than g -n10 -m200000 -t=a -increment.

In this case, now you can use the following code snippets in your generator:

int n = opt<int>("n");
long long n = opt<long long>("m");
string t = opt("t");
bool increment = opt<bool>("increment");

You can freely mix parameter reading by index and by name.

The following options for writing named parameters are supported:

  • --key = value or-key = value;
  • --key value or-key value — if value is not a start of a new parameter (does not start with a hyphen or does not follow the letter after one/two hyphens);
  • --k12345 or-k12345 — if the key k is one letter and then a digit comes;
  • -prop or--prop — to enable boolean properties.

Below are examples of how to run several fictional generators:

g1 -n1
g2 --len=4 --s=oops
g3 -inc -shuffle -n=5
g4 --length 5 --total 21 -ord

Perhaps in a hurry, I can write something not in the best way, or even with bugs. I suggest you look at my last commits. I will be glad to suggestions or fixes.

Thanks for attention.

What traditions do you have for the New Year?

Read more »

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