Rating changes for last rounds are temporarily rolled back. They will be returned soon. ×

By BledDest, 11 months ago, In English

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:

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.

REGISTER →

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.

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

»
11 months ago, # |
Rev. 3   Vote: I like it 0 Vote: I do not like it

Why I cant have a neutral moment ?

»
11 months ago, # |
  Vote: I like it 0 Vote: I do not like it

my prayers have finally been answered...

»
11 months ago, # |
  Vote: I like it 0 Vote: I do not like it

is it rated?

»
11 months ago, # |
  Vote: I like it -52 Vote: I do not like it

Can someone give a quick summary of what it is, please? I'm too lazy to read the blog x)

  • »
    »
    11 months ago, # ^ |
    Rev. 2   Vote: I like it +21 Vote: I do not like it

    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.

»
11 months ago, # |
  Vote: I like it -18 Vote: I do not like it

lol nice sanctions job

»
11 months ago, # |
  Vote: I like it +4 Vote: I do not like it

does it mean i cant get a tshirt

»
11 months ago, # |
  Vote: I like it +18 Vote: I do not like it

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).

  • »
    »
    11 months ago, # ^ |
      Vote: I like it +10 Vote: I do not like it

    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).

    • »
      »
      »
      11 months ago, # ^ |
        Vote: I like it +31 Vote: I do not like it

      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.

      • »
        »
        »
        »
        11 months ago, # ^ |
        Rev. 2   Vote: I like it 0 Vote: I do not like it

        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:

        • Kotlin 1.7: 700 ms for reading/writing 10^6 characters
        • Kotlin 1.6 without BufferedWriter: 700 ms
        • Kotlin 1.6 with BufferedWriter: 250 ms
»
11 months ago, # |
  Vote: I like it +3 Vote: I do not like it

The previous practice rounds are closed for register. How can I submit the code for practice rounds?

»
11 months ago, # |
  Vote: I like it +5 Vote: I do not like it

jetbrains is czech company, no? why they care about OFAC sanctions xdd

»
11 months ago, # |
  Vote: I like it -22 Vote: I do not like it

It is rated or Unrated?

»
11 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Wow This Contest sound Damn Interesting and very fascinating also... Maybe I should start learning Kotlin soon ...

»
11 months ago, # |
  Vote: I like it +3 Vote: I do not like it

Whoa! Finally it has come.

»
11 months ago, # |
  Vote: I like it -25 Vote: I do not like it

Is This rated??

»
11 months ago, # |
  Vote: I like it 0 Vote: I do not like it

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.

»
11 months ago, # |
  Vote: I like it +12 Vote: I do not like it

The round is unrated according to the announcement in the official Codeforces channel:

https://t.me/codeforces_official/1180.

»
11 months ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

Interesting! I would like to learn new language :)

»
11 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Can you provide t-shirts in Bangladesh?

»
11 months ago, # |
  Vote: I like it -7 Vote: I do not like it

does it means i can use chatGPT in thie contest to trans C++ to Kotlin?

»
11 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Excited for this interesting contest.

»
11 months ago, # |
  Vote: I like it +51 Vote: I do not like it

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!

»
11 months ago, # |
  Vote: I like it +29 Vote: I do not like it

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.

»
11 months ago, # |
Rev. 2   Vote: I like it +11 Vote: I do not like it

Do we need to fill any form to get the t-shirt?

This is my first time getting a t-shirt from codeforces. :)

  • »
    »
    11 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Same for me :)

  • »
    »
    11 months ago, # ^ |
      Vote: I like it +11 Vote: I do not like it

    After 6 years of competing here, it's my first one too haha -- plenty of near misses but here i am

»
11 months ago, # |
  Vote: I like it +9 Vote: I do not like it

When will practice submissions be enabled? I'm not able to submit right now.

»
11 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Could anyone solved B look at my code and clarify the logical error?
WA Test 2

  • »
    »
    11 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Here's the failing test case from your submission: -+-+

    • »
      »
      »
      11 months ago, # ^ |
      Rev. 2   Vote: I like it +1 Vote: I do not like it

      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.

»
11 months ago, # |
  Vote: I like it +17 Vote: I do not like it

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!

»
11 months ago, # |
  Vote: I like it 0 Vote: I do not like it

when will the prizes be announced. I want to test my luck in raffle :|

»
11 months ago, # |
  Vote: I like it +11 Vote: I do not like it

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!

Screenshot

I'm happy to have a chance to learn a new programming language!

Thanks guys for the contest!

»
11 months ago, # |
  Vote: I like it +1 Vote: I do not like it

Does the 51th person get the t-shirt since tourist is from Belarus?

  • »
    »
    11 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I think according to this criteria, the placements go down to about 55th place for the shirts, so that's a good question

  • »
    »
    11 months ago, # ^ |
      Vote: I like it +1 Vote: I do not like it

    I think he can send the T-shirt to other Country

  • »
    »
    11 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I hope so

  • »
    »
    11 months ago, # ^ |
      Vote: I like it +3 Vote: I do not like it

    Tourist should now buy a new address in another country, must have been losing a lot of rewards!

»
11 months ago, # |
  Vote: I like it 0 Vote: I do not like it

all competitors who solve at least one problem will be entered into a raffle for one of 50 Kotlin Heroes T-shirts

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.

»
11 months ago, # |
  Vote: I like it +11 Vote: I do not like it

Also, while editorial is in progress, here are my solutions for all problems except problem I from testing.

  • »
    »
    11 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Oh, thank you very much, Pavel! I was considering two options. First, try to solve the problems by myself. Second, start begging somebody else for the right solutions. So, you made my day. Next time, try harder and solve the "I" problem too! :D:D:D:D... it's just a joke :).

»
11 months ago, # |
Rev. 2   Vote: I like it -11 Vote: I do not like it

How can I enter the lottery?

»
11 months ago, # |
  Vote: I like it +4 Vote: I do not like it

When will the contestants who have passed the question be drawn?

»
11 months ago, # |
  Vote: I like it +21 Vote: I do not like it

Let's hope it won't take 3 months for shirts to be announced like it happened last time

»
11 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Can we use corountine in Kotlin? I tried to use kotlinx.coroutines.async but got CE.

  • »
    »
    11 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    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.

»
11 months ago, # |
  Vote: I like it 0 Vote: I do not like it

raffle done ?

»
11 months ago, # |
  Vote: I like it 0 Vote: I do not like it

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.)

  • »
    »
    11 months ago, # ^ |
      Vote: I like it -18 Vote: I do not like it

    I believe that's because people in charge have many other things to do.

    • »
      »
      »
      11 months ago, # ^ |
        Vote: I like it -22 Vote: I do not like it

      Thanks for your extremely valuable, life-changing input.

      • »
        »
        »
        »
        11 months ago, # ^ |
          Vote: I like it -21 Vote: I do not like it

        Too much noise from a person who didn't even take part in the contest.

        • »
          »
          »
          »
          »
          11 months ago, # ^ |
            Vote: I like it -21 Vote: I do not like it

          Oh really?! I didn't notice that!

        • »
          »
          »
          »
          »
          11 months ago, # ^ |
            Vote: I like it -22 Vote: I do not like it

          In all seriousness though, I meant my original comment for someone in the organizing team or something who actually knows what goes on behind the scenes as I was genuinely curious if there are some external procedures required to announce the winners, otherwise ideally they could be announced immediately after plagiarism checks I guess.

          Not for some idiot like you to pretend to be a smartass and pass meaningless comments.

  • »
    »
    11 months ago, # ^ |
      Vote: I like it +1 Vote: I do not like it

    I guess raffle is done, because I just got a mail to share my address and stuff for the kotlin gift.

»
7 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Kotlin Heroes 10's announcement is up, when are we getting the rewards announcement from season 9! Just curious..