Hello Codeforces!

We are happy to announce the new episode of Kotlin Heroes! It is both an opportunity to try learning a new programming language (if you've never coded in Kotlin before) or solve programming problems of very different levels of difficulty in it (if you're already familiar with Kotlin). No matter if you're a professional or a beginner, we'll be glad to see you participate!
This is already the fourteenth time we conduct this competition, and the previous 13 episodes had lots of amazingly talented programmers participating. You can see for yourself by checking them out: Episode 1, Episode 2, Episode 3, Episode 4, Episode 5: ICPC Round, Episode 6, Episode 7, Episode 8, Episode 9, Episode 10, Episode 11, Episode 12 and Episode 13.
To prepare for the Episode 14, we advise you to register to the practice round, which contains several problems of various difficulties from past Codeforces contests. In the practice round, all solutions will be open to view for anyone.
We also recommend that you check some resources which can help you learn more about competitive programming in Kotlin:
- An official competitive programming tutorial.
- A base of solutions for Advent of Code algorithmic puzzles.
- A collection of videos on using Kotlin in Competitive Programming, all arranged into one YouTube playlist.
And if you’d like to see how the top competitive programmers approach these challenges, check out ecnerwala and SecondThread solving problems from this practice round live on stage at the ICPC World Finals in Baku.
On March 2, 2026, the main phase of the contest starts! During Kotlin Heroes: Episode 14, you will have 2 hours and 30 minutes to solve several programming problems, ranging from simple short exercises to challenges that will test both your coding skills and algorithmic thinking.
The use of AI-based tools during the main contest is strictly limited. To find out the guidelines for proper AI use, what is allowed and what is prohibited, please read the post "Rule Restricting the use of AI". Improper use of AI tools during the main contest may result in disqualification. Using automatic translation tools (including but not limited to neural networks and AI) to convert code written in other programming languages to Kotlin goes against the spirit of the competition, so it is also strictly prohibited.
Prizes:
- 🥇 $512 (or equivalent value) for 1st place
- 🥈 $256 for 2nd place
- 🥉 $128 for 3rd place
- 👕 Kotlin Heroes T-shirts for the top 50 participants
- 🎁 A raffle of 50 T-shirts for anyone who solves at least one problem
Please note that we are not able to ship prizes to any country, state, province, or territory subject to comprehensive OFAC sanctions, including Belarus, Cuba, Iran, North Korea, Russia, Syria, or the Crimea, Donetsk, or Luhansk regions. For complete the list, please visit this page.
Good luck to all of the participants! I hope you will enjoy the problems we've prepared.








Is it time scaled ,like most other rounds ?
The register button redirects to Episode 13 instead of 14.
Hi, I'm wondering when we will receive our shirts for the last Kotlin Heroes contest (Episode 13)?
Hi, Apologies about late response. I believe that you received Episode 13 T-shirt beginning of March? Thank you for your patience.
Hi, yes I received the T-shirt and stickers. Thank you!!
SIX SEVEN
for complete the list...
Good luck all :)
How can I know if I've received the T-shirt or not and will they contact me when the T-shirt starts shipping?
Hi, Are you referring to any Episode in particular? If it's a general question then the answer is that all winners will be contacted to gather delivery details first and then when the prizes are shipped they will get notifications with the tracking details. Hope it helps.
How to solve H?
For each prefix, some numbers are already fixed and some positions are -1 (free). Suppose we want a certain value X to be the MEX. Then all numbers from 0 to X-1 must appear. If some of them are missing, those are gaps. We must fill exactly those gaps using the -1 positions. So first we count how many holes each X needs. If gaps<= number of -1, it’s possible. Then we use dp , where dp[i] tells how many ways we can fill exactly i holes. Since hole count increases smoothly with X, we group them and add contributions efficiently using range query
yes, i literally got an idea for H right after contest finished lol
Such a fun competition! Thanks for organizing this.
Any hint for I ??
not for cheaters
nice cheats bro
are they gonna eliminate cheaters from standings, bcz i'm kinda 51st place
upd: yay i got into top49
they should actually, leaderboard is full of cheaters
We have already removed some of them during the competition, but we are not done yet. Expect changes in the scoreboard
Ok, thanks very much
Thank you for the contest, it was fun!
Technical note: if you click on Kotlin logo in the header on the contest page, you go to: https://mirror.codeforces.com/kotlin
But on that page the latest post is from 17 months ago!
I guess, /kotlin page should be either always updated or deprecated.
It seems only the blogs aren't updated, but the latest contests are there
How can I receive the prize? Where do I need to fill in my address?
Hi,
I can see your handle in the list of winners. You will be contacted shortly to provide the shipping details and then once the prize is shipped you will get a notification with tracking details.
Thank you for your patience.
I discovered that Bicky_verma077, ranked 47th, registered just minutes before the contest ended and passed 7 problems in 2 minutes. Is he really not a cheater?
17 seconds on average to write a solution and submit and pass. Seems legit to me! /s