By MikeMirzayanov, 6 weeks ago, In English


I started processing responses on the form where we collected your TON wallet addresses. Unfortunately, many winners did not complete the form. I contacted some of them in PM and it turned out that this was not intentional.

We are extending the deadline for completing the form until 2022-04-06 23:59:59 (UTC +3). Please, if you want to receive coins, then fill out the form. A valid address looks like a random 48-character string. To register a wallet, follow one of these links: or

The form can be filled out at

Coins will be received by those who are at the top-1000. Additionally, those who solved at least one problem in this round will receive 1 coin each. Details can be read at the link.

The form will be processed on April 7th. And in a week after it, we will send out coins. Please do not disturb me or the organizers with questions that are answered in this post.

Also I remind you about TON Smart Challenge contest aimed at contract source code optimization: It's not too late to connect and try your hand

You can read more about this competition here:

TON Smart Challenge 1 →

Read more »

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

By Agnimandur, history, 2 months ago, In English

With Nickolas not writing a contest this year, magnus.hegdahl and I have decided to take up this sacred duty :). We would like to invite everyone on Codeforces to the April Fools Day Contest 2022. Special thanks to BucketPotato for volunteering to test this contest!

The 10th April Fools Day Contest will take place on Apr/01/2022 17:35 (Moscow time). This is a joke competition in which solving the problem is often easier than figuring out what the actual task is.

In this round you'll be given several weird problems and 2 hours to solve them. The contest will use ACM ICPC rules (no hacks, the standings are decided by the number of solved problems and penalty time earned on them), and it will be unrated. You can submit solutions in any language allowed by Codeforces, unless the problem says otherwise. To get an idea of what the contest will look like, you can check out the contests of the past years: 2012, 2013, 2014, 2016, 2017, 2018, 2019, 2020, 2021.

Good luck, and have fun!

UPD: There will be 8 problems. There will be only be an interactive problem if the Collatz Conjecture is true...

UPD: Thanks to everyone who participated! I hoped you enjoyed thinking over the problemset. The editorial is available, complete with solution code and hints. Special congratulations to the winners.

Rank Username Score
1 MatrixCascade_qwq 7 (330)
2 kk19212 7 (339)
3 xyf007 7 (341)
4 Tyyyyyy 7 (345)
5 F1aMiR3 7 (345)

Read more »

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

By Aris, 7 weeks ago, In English

Hello! Codeforces Round #780 (Div. 3) will start at Mar/31/2022 17:35 (Moscow time). You will be offered 6-8 problems 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 a rating of 1600 or higher, can register for the round unofficially.

The round will be hosted by rules of educational rounds (extended ICPC). Thus, solutions will be judged on preliminary tests during the round, and after the round, it will be a 12-hour phase of open hacks.

You will be given 6-8 problems and 2 hours and 15 minutes to solve them.

Note that the penalty for the wrong submission in this round 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 participant of the third division, you must:

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

Thanks to NEAR for supporting this round, details can be found in this post.

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 our work. Problems have been created and written by ITMO University team: MikeMirzayanov, MisterGu, myav, Gol_D, Aris, SixtyWithoutExam and Vladosiya.

We would like to thank: arvindr9, hocky, lucasxia01, Evirir, Sorting, mhq, yorky, Jostic11, sansen, leaf1415, Masha237, amr_abdelazim, coderbd, gs17005, nebula for testing the contest and valuable feedback. List of testers will be updated.

Good luck!

UPD: Editorial

Read more »

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

By MikeMirzayanov, 7 weeks ago, In English

Hello, Codeforces.

We live in difficult times. And, unfortunately, our community is highly dependent on world events around us. Three years ago, it seemed easy to send a t-shirt anywhere in the world. Now it's a quest with many unknowns. Just a few months ago, it was not difficult to send a reward to the problem writer. But now, we are cut off from the outside world and regulated by multiple new laws.

And here it is very important not to lose, not to break what has already been done. Don't stand still, move forward. I am very glad and grateful to the problem writers and coordinators that in March we managed to hold 10 ratings (we held 9, come to participate in the tenth). Thanks to everyone who took part in the preparation!

And I want to share another great news. Our friends NEAR has come up with the initiative to support the community during this difficult time. We are pleased to announce that the upcoming rounds will be funded by NEAR, which will help with the payment of rewards to problem writers and coordinators. This is a timely and important help. Thanks!

It will be easier and faster for us if the problem writers or coordinators have the opportunity to accept a reward in the form of a cryptocurrency transfer. In this case, we are ready to transfer 25% more and make the transfer much faster. Oh, it's a pity we can't send t-shirts with crypto.

And I remind you that the next round (and Codeforces Round #780 (Div. 3)) is waiting for you) will take place very soon, on Mar/31/2022 17:35 (Moscow time). I hope to see you among the participants.

— Mike

Read more »

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

By MikeMirzayanov, 2 months ago, In English

TLTR: If you are in the top-1000 of CodeTON Round 1, then fill out the form by the link Also, anyone who solved at least one problem in the round can fill out it and get 1 TON airdrop. The deadline is 23:59:59 (UTC +3) 04.04.22.

Hello. Great news from the TON Team. I give them the floor.

Good news everyone!

We decided to celebrate the successful finish of the CodeTON round by airdropping all the people who have solved at least one of the problems (officially, practice and virtual participation don't count) of the CodeTON round. Such participants are eligible for 1 TON airdrop and a memorable NFT. Please do note that such NFT bears only symbolic value and is not entered to have any financial or investment value.

Please submit your TON wallet address via the link if you are eligible for such an airdrop by 23:59:59 (UTC +3) 04.04.22.

Winners are more than welcome to provide organizers with the TON Wallet addresses to claim their prizes.

We also want to invite all of you to try yourself at TON Smart Challenge contest aimed at contract source code optimization:

You can read more about this competition here:

TON Smart Challenge 1 →

Thank you for taking your part, hope you enjoyed the round, looking forward to meeting you later!

TON Foundation

Read more »

Tags ton
  • Vote: I like it
  • +339
  • Vote: I do not like it

By DeMen100ns, 2 months ago, In English

Xin chào, Codeforces! (Hello, Codeforces!) ٩ (◕‿◕。) ۶

Me, _FireGhost_ and SPyofgame are glad to invite you to Codeforces Round #779 (Div. 2), which will take place on Mar/27/2022 17:35 (Moscow time). The round will be rated for participants with rating lower than 2100. You will have 2 hours to solve 6 problems, one of which is divided into two subtasks.

In this contest, you will meet Kitagawa Marin and her friends Gojou, Juju and Shinju from My Dress-up Darling! We hope you will find our problems interesting. Good luck to you all! (ノ ◕ ヮ ◕) ノ *: ・ ゚ ✧

We sincerely thank the following people for their contributions in the round:

Score distribution: $$$500-1000-1750-(1250+750)-2500-3000$$$

UPD: Editorial

Congrats to the winners:

  1. tourist
  2. MeliodasIRA
  3. A-SOUL_Official
  4. Geothermal
  5. oleh1421

Read more »

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

By FelixMP, history, 2 months ago, In English


It is a pleasure to invite you to CodeTON Round 1 (Div. 1 + Div. 2, Rated, Prizes!)! The round will take place on Mar/24/2022 17:35 (Moscow time). The round will be rated for all participants. The problems of the round were authored by FelixMP, and they were prepared by FelixMP and xpov1LL.

I would like to thank the following people:

There will be 9 problems in the round, with score distribution $$$500 - 1000 - 1500 - 2000 - 2500 - 3000 - 3250 - 3750 - 4500$$$. Hope you have fun!

UPDATE: Editorial.

Here is information from our partners:

Hello, Codeforces!

We, the TON Foundation team, are pleased to support the CodeTON round and invite you to the TON Smart Challenge 1 competition, which will be held on our platform.

The Open Network (TON) is a fully decentralized blockchain created by the Telegram team for a mass audience.

The TON protocol was designed by Nikolai Durov — who is a two-time ICPC world champion, a three-time IMO gold medalist, a multiple IOI medalist, and a co-founder of Telegram — and other winners of international competitions. Now TON is being developed by a community of independent developers and teams.

The winners of CodeTON Round 1 will receive valuable prizes.

The first 1,000 participants will receive prizes in TON cryptocurrency:

  • 1st place: 1,000 TON
  • 2–3 places: 600 TON each
  • 4–10 places: 100 TON each
  • 11–100 places: 15 TON each
  • 101–1,000 places: 8 TON each

Also, the top 15 participants of CodeTON Round 1 will receive branded hoodies.

In addition, a separate TON Smart Challenge 1 contest will start on our platform on March 28. We invite you to join this competition as well.

You can read more about this competition here:

TON Smart Challenge 1 →

We believe that the problems of optimizing the efficiency of smart contract code execution on the TON blockchain may be of interest to participants in algorithmic competitions. The development of smart contracts is a case where the experience of optimization earns money by definition because a network fee is paid for each operation on the blockchain.

We wish you good luck at CodeTON Round 1 and hope to see you among the TON Smart Challenge participants!

UPD: If you have got into prizes or just want to join the TON, then register a wallet, follow one of these links: or

Read more »

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

By awoo, history, 2 months ago, translation, In English

Hello Codeforces!

On Mar/22/2022 17:45 (Moscow time) Educational Codeforces Round 125 (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 or 7 problems and 2 hours to solve them.

The problems were invented and prepared by Adilbek adedalic Dalabaev, Vladimir vovuh Petrov, Ivan BledDest Androsov, Maksim Neon Mescheryakov and me. Also huge thanks to Mike MikeMirzayanov Mirzayanov for great systems Polygon and Codeforces.

Good luck to all the participants!

UPD: Editorial is out.

Read more »

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

By emorgan5289, 3 months ago, In English

Hi everyone!

The Final Round of Technocup 2022 starts this Sunday, March 20, 2022 at 11:00 MSK (09:00 UTC)!

The final results of the Technocup Final Round >>>

For those who want to compete on the same problems, we will hold a regular Codeforces Round, combined for both divisions. The round is starting at Mar/20/2022 14:35 (Moscow time).

If you are a participant of the official Technocup Finals, you are not allowed to take part in the round 778. We ask participants of the official Finals not to discuss the problems in open media till evening.

This round is possible thanks to the following people:

Score distribution: $$$500 - 750 - 1250 - 2000 - 2500 - 3000 - 3500 - 4000$$$

UPDATE: Editorial is out

UPDATE: Congratulations to the winners:

  1. Golovanov399
  2. orzdevinwang
  3. slime
  4. xtqqwq
  5. ugly2333

Read more »

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

By geranazavr555, 2 months ago, In English


The most problems on Codeforces are "classic input-output" problems in which you have to write an entire program: read the input and write the answer. Also, there are "interactive" problems in which you have to interact with a jury's program. But Codeforces supports some other types of problems: problems with graders and output-only problems.

You can test an output-only problem and a problem with grader in this mashup.

Problems with graders

In such problems, you (a participant) have to implement not the entire program but only some interface or function described in the problem's statement. For example. you may be asked to implement function f(a: int, b: int, c: int) -> int in Python or int f(int a, int b, int c) in C++. Only Python and C++ are supported for now for such problems.

For problem writers: read this post and this post to learn how to create a problem with a grader. The example problem with a grader is already shared with all Polygon users.

Output-only problems

In such problems, you (participant) have to send only a zip-file with outputs on each test (or only on a subset of tests). The structure of the zip file must be following:
|- 01.out
|- 02.out
|- 03.out

I.e. zip-file must contain text files with the outputs named like <2-digits-test-index>.out.

Commonly, each problem could be marked as output-only, but it's recommended to publish tests using the "Problem materials" section in Polygon (see this post to learn more).

Read more »

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