Изменения рейтингов за последние раунды временно удалены. Скоро они будут возвращены. ×

Автор BledDest, 11 месяцев назад, По-английски

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://codeforces.net/blog/entry/123261.

  • Проголосовать: нравится
  • +88
  • Проголосовать: не нравится

»
11 месяцев назад, # |
Rev. 3   Проголосовать: нравится 0 Проголосовать: не нравится

Why I cant have a neutral moment ?

»
11 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

my prayers have finally been answered...

»
11 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

is it rated?

»
11 месяцев назад, # |
  Проголосовать: нравится -52 Проголосовать: не нравится

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

  • »
    »
    11 месяцев назад, # ^ |
    Rev. 2   Проголосовать: нравится +21 Проголосовать: не нравится

    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 месяцев назад, # |
  Проголосовать: нравится -18 Проголосовать: не нравится

lol nice sanctions job

»
11 месяцев назад, # |
  Проголосовать: нравится +4 Проголосовать: не нравится

does it mean i cant get a tshirt

»
11 месяцев назад, # |
  Проголосовать: нравится +18 Проголосовать: не нравится

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 месяцев назад, # ^ |
      Проголосовать: нравится +10 Проголосовать: не нравится

    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 месяцев назад, # ^ |
        Проголосовать: нравится +31 Проголосовать: не нравится

      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 месяцев назад, # ^ |
        Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

        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 месяцев назад, # |
  Проголосовать: нравится +3 Проголосовать: не нравится

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

»
11 месяцев назад, # |
  Проголосовать: нравится +5 Проголосовать: не нравится

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

»
11 месяцев назад, # |
  Проголосовать: нравится -22 Проголосовать: не нравится

It is rated or Unrated?

»
11 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

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

»
11 месяцев назад, # |
  Проголосовать: нравится +3 Проголосовать: не нравится

Whoa! Finally it has come.

»
11 месяцев назад, # |
  Проголосовать: нравится -25 Проголосовать: не нравится

Is This rated??

»
11 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

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 месяцев назад, # |
  Проголосовать: нравится +12 Проголосовать: не нравится

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

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

»
11 месяцев назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

Interesting! I would like to learn new language :)

»
11 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Can you provide t-shirts in Bangladesh?

»
11 месяцев назад, # |
  Проголосовать: нравится -7 Проголосовать: не нравится

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

»
11 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Excited for this interesting contest.

»
11 месяцев назад, # |
  Проголосовать: нравится +51 Проголосовать: не нравится

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 месяцев назад, # |
  Проголосовать: нравится +29 Проголосовать: не нравится

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 месяцев назад, # |
Rev. 2   Проголосовать: нравится +11 Проголосовать: не нравится

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

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

»
11 месяцев назад, # |
  Проголосовать: нравится +9 Проголосовать: не нравится

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

»
11 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

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

  • »
    »
    11 месяцев назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

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

    • »
      »
      »
      11 месяцев назад, # ^ |
      Rev. 2   Проголосовать: нравится +1 Проголосовать: не нравится

      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 месяцев назад, # |
  Проголосовать: нравится +17 Проголосовать: не нравится

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 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

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

»
11 месяцев назад, # |
  Проголосовать: нравится +11 Проголосовать: не нравится

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 месяцев назад, # |
  Проголосовать: нравится +1 Проголосовать: не нравится

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

»
11 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

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 месяцев назад, # |
  Проголосовать: нравится +11 Проголосовать: не нравится

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

  • »
    »
    11 месяцев назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    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 месяцев назад, # |
Rev. 2   Проголосовать: нравится -11 Проголосовать: не нравится

How can I enter the lottery?

»
11 месяцев назад, # |
  Проголосовать: нравится +4 Проголосовать: не нравится

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

»
11 месяцев назад, # |
  Проголосовать: нравится +21 Проголосовать: не нравится

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

»
11 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

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

  • »
    »
    11 месяцев назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    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 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

raffle done ?

»
11 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

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 месяцев назад, # ^ |
      Проголосовать: нравится -18 Проголосовать: не нравится

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

    • »
      »
      »
      11 месяцев назад, # ^ |
        Проголосовать: нравится -22 Проголосовать: не нравится

      Thanks for your extremely valuable, life-changing input.

      • »
        »
        »
        »
        11 месяцев назад, # ^ |
          Проголосовать: нравится -21 Проголосовать: не нравится

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

        • »
          »
          »
          »
          »
          11 месяцев назад, # ^ |
            Проголосовать: нравится -21 Проголосовать: не нравится

          Oh really?! I didn't notice that!

        • »
          »
          »
          »
          »
          11 месяцев назад, # ^ |
            Проголосовать: нравится -22 Проголосовать: не нравится

          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 месяцев назад, # ^ |
      Проголосовать: нравится +1 Проголосовать: не нравится

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

»
7 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

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