Greetings Codeforces!
We are thrilled to announce the return of Kotlin Heroes! As we resume this competition, we're eager both to welcome back some familiar names and meet new participants. Let's make Kotlin Heroes: Episode 9 an occasion to remember!
We would like to thank everyone who participated in the previous eight Kotlin Heroes competitions: Episode 1, Episode 2, Episode 3, Episode 4, Episode 5: ICPC Round, Episode 6, Episode 7, and Episode 8.
Kotlin Heroes is a great way to play around with Kotlin’s features, learn something new, and practice using the language by solving fun problems. It is great for programmers of any level!
We invite you to join the practice round, where you can hone your algorithmic problem-solving skills and complete training problems. In this round, all the solutions are open and you can request hints if you’re stuck.
Here are some things you can do to help you refresh your knowledge of Kotlin and learn more about competitive programming while you practice:
- Review our Kotlin solutions for the Advent of Code algorithmic puzzles.
- Read our competitive programming tutorial.
- Watch the videos from our Kotlin in Competitive Programming YouTube playlist.
- Look at the problems from the previous practice rounds.
On December 11, 2023, the real challenge begins! Kotlin Heroes: Episode 9 will last 2 hours 30 minutes and will feature a set of problems ranging from simple ones, which are designed to be solvable by anyone, to some really tricky ones for seasoned competitive programmers.
You can solve Codeforces challenges directly from your JetBrains IDE using its smart features. Just enable the JetBrains Academy plugin and follow the instructions in the Getting started with Codeforces guide.
Prizes:
The top three winners will receive cash prizes of $512, $256, and $128 (or rewards of equivalent value), respectively. The top 50 participants will win a Kotlin Heroes T-shirt and an exclusive Kotlin sticker, and all competitors who solve at least one problem will be entered into a raffle for one of 50 Kotlin Heroes T-shirts.
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. To see the list of sanctioned countries and regions, please visit this page.
Best of luck to everyone!
UPD: The round tutorial has been published at the following link: https://mirror.codeforces.com/blog/entry/123261.
my prayers have finally been answered...
is it rated?
According to Kotlin Heroes 9 Announcement, I think the round is unrated.
It's a pity, I wanted to raise the rating, well, good luck, guys
Money>rating
:(
Can someone give a quick summary of what it is, please? I'm too lazy to read the blog x)
There is a contest on December 11, 2023 at 14:35 UTC where the only allowed language is Kotlin.
The top three winners will receive cash prizes of $512, $256, and $128, the top 50 participants will win a Kotlin Heroes T-shirt and an exclusive Kotlin sticker and all competitors who solve at least one problem will be entered into a raffle for one of 50 Kotlin Heroes T-shirts.
lol nice sanctions job
does it mean i cant get a tshirt
Send it to Kazakhstan
Are we allowed to use either Kotlin 1.6 or 1.7 for the contest, or can we only use kotlin 1.7 (as suggested by the practice round)?
There are many situations where Kotlin 1.6 runs much faster (seems to be specific to codeforces and not about the language. Kotlin 1.8 runs perfectly fine on Atcoder for example).
As I understand, kotlin 1.6 on codeforces runs using jvm 11, while 1.7 and 1.9 runs using jvm 17. This can probably be the source of the difference. I'd expect it to be to both sides (e.g JVM 17 have more aggressive jit setup, which would probably be slower on small-timelimit problems, and faster on large-timelimit).
I did slightly more digging after noticing that Kotlin 1.9 is now available.
I finally got a clear as day confirmation as something I had been suspecting for a long time: 1.6 runs on 32 bits, 1.7 and 1.9 runs on 64 bits. (236711998,236712006,236712010). Anything that requires objects (including (auto)-boxing, so anything outside of IntArray, LongArray etc.) is noticeably faster on 1.6 (I would guess that there is less memory overhead for 32 bits), but anything related to 64 bits operations (e.g. modded multiplication, FFT or bitsets) 1.7 or 1.9 is typically twice as fast. (This 236711621 100 FFT of size 1e5 in ~2.5s would be impossible on 1.6).
The most atrocious example is the sorting an array (with List). Sorting 1e6 takes 600ms on 1.6 but 1.5s on 1.7 236712446, 236712444 .
I would presume jvm 17 has to be faster than jvm 11 in general but I think the 32-bit issue overshadowed it.
I tried submitting a few things in 1.9. It is nice to see that 1.9 seems to be consistently slightly faster than 1.7.
I also did some testing a few months ago (can't show since the problem is in a private mash-up and I don't know how to make it public), and 1.6 had noticeably faster I/O:
The previous practice rounds are closed for register. How can I submit the code for practice rounds?
jetbrains is czech company, no? why they care about OFAC sanctions xdd
Whoa! Finally it has come.
How do you set the Kotlin Environment up, im pretty sure im not gonna use the android studio and run the AVD to test my solutions :/ Apart from kotlin playground, on local machine.
You can use IntelliJ. It can be downloaded here https://www.jetbrains.com/idea/download
Community edition is free to use, and would be more then enough for this competition. It contains bundled support for Kotlin, so nothing else needs to be installed.
Thankyou!
The round is unrated according to the announcement in the official Codeforces channel:
https://t.me/codeforces_official/1180.
does it means i can use chatGPT in thie contest to trans C++ to Kotlin?
I am surprised by the quality of the problems. I thought this contest would be implementation spam to test that people understand kotlin syntax but all problems that I solved in contest time had really short implementation and I was able to get away with chatGPT + some fixes :P. I really enjoyed solving G and J, thanks to authors!
The editorial is currently a bit unpolished, so the official version will be posted in several hours. You can take a look at the work-in-progress version here.
Do we need to fill any form to get the t-shirt?
This is my first time getting a t-shirt from codeforces. :)
Same for me :)
After 6 years of competing here, it's my first one too haha -- plenty of near misses but here i am
When will practice submissions be enabled? I'm not able to submit right now.
Could anyone solved B look at my code and clarify the logical error?
WA Test 2
Here's the failing test case from your submission:
-+-+
Wow, I thought you didn't pay enough attention because its output is -1 but then noticed we can swap the first — with the last + to get valid record. Thank you.
Is there a way problems can be added to a list or a gym so that non kotlin users can solve them?
The problem set was very good, kudos!
It's my first time I use Kotlin and participate in the contest with! Opened a lot of StackOverflow tabs to look up for the syntax and AtCoder for the custom test since I don't have Kotlin installed. Got 3 AC in the first submit, so surprised!
I'm happy to have a chance to learn a new programming language!
Thanks guys for the contest!
Does the 51th person get the t-shirt since tourist is from Belarus?
I think according to this criteria, the placements go down to about 55th place for the shirts, so that's a good question
I think he can send the T-shirt to other Country
I hope so
Tourist should now buy a new address in another country, must have been losing a lot of rewards!
Does solving more than 1 problem increase our chances to win a T-shirt in this raffle? Looking at the results, I see that many participants haven't even bothered to attempt solving more.
Also, while editorial is in progress, here are my solutions for all problems except problem I from testing.
How can I enter the lottery?
When will the contestants who have passed the question be drawn?
Let's hope it won't take 3 months for shirts to be announced like it happened last time
I hope it will be sooner
Update: I got the message asking me to fill the form for the shirt, thanks.
Can we use corountine in Kotlin? I tried to use kotlinx.coroutines.async but got CE.
I think that's a separate library. When I used it I had to install it separately because it is part of an extension library.
raffle done ?
When will the prize winners be declared? Also I'm curious as to why it takes such long to declare the winners (like it took 3 months the last time). Isn't it just running some code and picking people? Are there some technical reasons why it is delayed? (I do not mean in a "whining" sort of a way, I'm genuinely curious as to why it takes so long to declare the prize winners.)
I believe that's because people in charge have many other things to do.
Thanks for your extremely valuable, life-changing input.
Too much noise from a person who didn't even take part in the contest.
I guess raffle is done, because I just got a mail to share my address and stuff for the kotlin gift.
I got it too, congratulations to you
Thanks! And congratulations to you as well.
Nice. Congratulations! :)
Kotlin Heroes 10's announcement is up, when are we getting the rewards announcement from season 9! Just curious..
Same question also in my mind.
May be they have already distributed the prizes. But don't know why they didn't give any announcement.
no, they usually do inform the participants!
I think that has been announced
Thanks! I didn't see it before.
Thanks