By AhmedSoliman, 12 days ago, In English,

Hello, Codeforces!

I'd like to invite you to Codeforces Round #465 (Div. 2) which takes place on Monday, 19 February 2018 at 19:35 MSK. The round will be rated for division 2 participants. However, as usual division 1 can take part out of competition.

The round is prepared by my friends Kammola, Ahmad_Elsagheer, MostafaAbdullah and me (AhmedSoliman). Besides, many thanks to 300iq, mike_live, Arpa, GreenGrape and neckbosov for testing the round, KAN for coordinating the round and MikeMirzayanov for the great Codeforces and Polygon platforms.

You will be given 6 problems and 2 hours to solve them. The scoring distribution will be announced later. Good luck!

UPD1: Scoring is 500 — 750 — 1250 — 1750 — 2250 — 2750

UPD2: Congratulations to the winners!

Division 1 :

  1. Benq
  2. eddy1021
  3. KrK
  4. kmjp
  5. chemthan

Division 2 :

  1. Iiu_runda
  2. FlzzyDavid
  3. Baggins
  4. sorry_teamskiy
  5. InkyFlameMaster

UPD3: The Editorial is available now!

Thank you everyone!

Read more »

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

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

In case you want to take part in Yandex.Algorithm 2018 but somehow haven't registered yet, you might want to follow this link.

Qualification round has started at 00:00 Moscow time, February 17th. Round is a virtual competition 100 minutes long. You can start it at any moment of time till 23:59 on Sunday, February 18th (Moscow time).

We recall that in order to be able to participate in elimination stage one needs to accept at least one problem at qualification round. However, everyone who managed to accept at least one problem during warm-up has already qualified to the next stage.

Judges ask all the participant to withdraw from any problem discussion and do not publish any solutions till 01:40, February 19th.

Good luck, we hope that you will enjoy the problems!

Read more »

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

By KAN, 7 days ago, translation, In English,


The Codeforces Round #464 (Div. 2) is going to be held on Saturday, 17 February 2018 at 10:05 UTC for participants from division 2.

The round is based on XIV Nizhny Novgorod Olympiad in Informatics named after V. D. Lelyukh for high school students, which will take place on Saturday in Nizhny Novgorod. However, the problems for the Olympiad and for the round are not completely identical.

The problems were prepared by KAP, ashmelev, ZhNV, kuzmichev_dima, demon1999, SYury, mmatrosov and me. Thanks to mike_live and vepifanov for testing the problems, and gritukan and MikeMirzayanov for helping us to host the round on Codeforces!

As usual, participants from division 1 can take part out of competition.

Good luck and have fun!

UPD: There will be 6 problems with the following scores: 500-1000-1500-2000-2500-2750.

You will be able to view submissions and tests after the end of the olympiad in Nizhny Novgorod around 13:30 UTC.

Congratulations to winners!

Div. 2:

  1. LitiIsPretty
  2. newbiedmy
  3. lijian666
  4. S.H.I.E.L.D

Div. 1:

  1. dotorya
  2. eddy1021
  3. DmitryGrigorev
  4. uwi
  5. georgerapeanu

The editorial is here.

Read more »

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

By PikMike, history, 8 days ago, translation, In English,

Hello Codeforces!

On February 16, 18:05 MSK Educational Codeforces Round 38 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 Div. 2. 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 prepared by Ivan BledDest Androsov, Sahand Sahaand Alitanloo and me.

Thanks Mike MikeMirzayanov Mirzayanov for great system Polygon!

Good luck to all participants!

UPD: Since there will be another Div. 2 contest soon, the hacking phase will be shorter (only 12 hours). Before CF Round 464 we will actualize the registrations in such a way that Div. 2 will be officially registered, and Div. 1 participants — unofficially.

UPD2: We also have a message from our partners Harbour.Space:

We are excited to announce that some of the world’s strongest teams will come to our Hello India x Russia Programming Bootcamp: MIPT and all top India’s Universities that qualified to the World Finals!

As always, the boot camp isn’t only about the training — we’re in the process of getting renowned keynote speakers from all over the globe to come and speak about life and all the opportunities at your fingertips after ACM-ICPC.

We look forward to seeing you all there this spring! For those of you who haven't registered, there's still time.

Register here

If you have any questions we can help you with, please connect with us:

Phone number: +34 674 291 422 Email Address:

UPD3: Editorial is published

Read more »

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

By aropan, 8 days ago, translation, In English,

The 8th BSUIR Open Programming Championship will be held from February 16 till April 13, 2018 (Minsk, Belarus).

Read more »

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

By praran26, 9 days ago, In English,

Hello, Codeforces!

I would like to invite you all to the International Coding Marathon 2018, under the banner of Technex'18, IIT (BHU) Varanasi. It will take place on Thursday 15th February 2018, 20:05 IST. The contest will be held as a combined Div.1+Div.2 round which will be rated for participants from both divisions.

The problemset has been prepared by me (praran26), dark_n8, hitman623, dhirajfx3, karansiwach360 and enigma27. We would like to express our heartiest thanks to gritukan and KAN for their constant help in preparing the contest and MikeMirzayanov for the amazing Codeforces and Polygon platforms. We also thank AlexFetisov and winger for their invaluable help in testing the problems.


  • Overall 1st place: INR 35,000
  • Overall 2nd place: INR 25,000
  • Overall 3rd place: INR 15,000
  • 1st place in India: INR 10,000
  • 2nd place in India: INR 8,000
  • 3rd place in India: INR 6,000
  • 1st place among IIT (BHU) Varanasi freshmen: INR 1,000

Participants will have 2 hours to solve 7 problems. The scoring distribution will be announced soon.

Good luck everyone! Hope to see you on the leaderboard.

Update: Scoring is 500 — 1000 — 1500 — 2000 — 2500 — 2500 — 3000

Update 2: Thanks to all participants and congratulations to all the winners. The winners, who are eligible for prizes, will soon be contacted regarding the same.

Overall top 10

  1. Radewoosh
  2. fateice
  3. Um_nik
  4. laofudasuan
  5. dotorya
  6. 300iq
  7. LHiC
  8. ksun48
  9. wxh010910
  10. chemthan

Indian top 5

  1. PrashantM
  2. rajat1603
  3. Baba
  4. jtnydv25
  5. adkroxx

Some problem statements were not clear. We deeply regret the inconvenience caused.

The editorial has been posted here. This was first contest set by most of us, so please help us do better next time by filling this form.

Read more »

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

By mplaza, 9 days ago, In English,

Hello, Codeforces!

I would like to invite you to take part in the 10th jubilee edition of the international programming marathon Deadline24. During the contest, the teams of three tackle algorithmic problems.

Registration will last until February 22 and it is possible through the form available on the website:

The qualifying round will take place on Sunday, February 25. During it the registered teams will struggle to solve tasks for 5 hours and this will be verified by server. This part of the competition is carried out remotely. In the last year a record number of competitors registered for the first phase — 1950.

For the final — which lasts for 24 hours — 30 teams with the best scores obtained during the elimination will be invited. The final will take place on 7- 8 of April in Poland. This year the best teams will win: Oculus Rift, iPad and Kindle Oasis 2.

Don't forget that the registration ends on February 22! Good luck in the qualifying round :)

If you are interested in the previous years' tasks, you can find them here.

Special thanks to Mike Mirzayanov for his help in promoting the competition on CF.

Read more »

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

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

Hi, Codeforces! Happy Valentine's Day. And happy Lunar New Year!

I'm quite honored to invite you to Codeforces Round #462 which will take place at 15:05 MSK on 14 Feb and last for two hours.

The authors are quailty, skywalkert, visitWorld and me. This is our second round here.

The round couldn't have been realized without efforts of KAN and our testers: cyand1317, demon1999. Thanks for your help to the contest. Also, thank MikeMirzayanov for the fantastic Codeforces and Polygon platforms.

The contest will consist of five problems and it is rated for both division contestants.

The background of problems will be about Lunar New Year. (Yes... Not Valentine's Day...)

Hope to see you in the contest! Good luck and have fun, wish you a high rating!

We suggest that those who already have Valentine's Day plans should not participate... You can always upsolve a contest, but there is only one Valentine's Day ;)

The scoring distribution will be announced later.

See you in the contest!

UPD: The scoring distribution is:

div1: 500 — 750 — 1500 — 2250 — 2500

div2: 500 — 1000 — 1500 — 2000 — 2500

UPD2: Congratulations to the winners!

Division 1 :

  1. Um_nik (solved all problems!)
  2. Golovanov399
  3. geniucos
  4. fateice
  5. kriii

Division 2 :

  1. aabdelzaher
  2. WNG
  3. ZYF1023
  4. Kita_The_Dragon
  5. _Kuroni_

UPD3: The editorial is available now!

Thank you everyone!

Happy Valentine's Day and happy Lunar New Year!

See you next time!

Read more »

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

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

C++17 is now available on codeforces, community wants new edition of C++ tricks by Swift, so, let's start!
Disclaimer: I have done only few examples of new features, which in my opinion are related to competitive programming. Feel free to comment and provide more real-world examples or ask to elaborate some features with more examples or explanations.

Fold expressions

  • I think that everybody knows, what reduce or fold means, but a c++11 example:
vector<int> v = {1, 3, 5, 7};
int res = accumulate(v.begin(), v.end(), 0, [](int a, int b) { return a + b; });
cout << res; // 16
  • In C++17 there is also folding support for a template parameters list. It has the following syntax:
(pack op ...)
(... op pack)
(pack op ... op init)
(init op ... op pack)
  • For example, implement a template function that takes a variable number of parameters and calculates their sum.

Read more »

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