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

Greetings Codeforces!

First things first, we would like to thank everyone who participated in the previous nine Kotlin Heroes competitions: Episode 1, Episode 2, Episode 3, Episode 4, Episode 5: ICPC Round, Episode 6, Episode 7, Episode 8, Episode 9, and Episode 10.

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

Watch tourist and ecnerwala tackle the Kotlin Heroes practice round challenges at the ICPC World Finals in Astana.

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 September 30, 2024, the real challenge begins! Kotlin Heroes: Episode 11 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.

Note that the usage 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.

REGISTER →

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!

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

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

Not relevant to me, but please clarify if language translations from other languages into Kotlin are allowed. (And also clarify for language translations on CF in general). It is not explicitly ruled out in the “Rule restricting the use of AI” blog, and it is debatable if it falls under allowed cases.

(Edit): For this contest it is quite clear that it should not be allowed. I personally think language translations in general should not be allowed. The reasoning is too long for me to summarizes in this short comment.

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

    This is probably not allowed, considering the allowed language is Kotlin only. If this were allowed, they would just open it to new languages. Why would you make it Kotlin only then allow people to convert?

    just my take

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

    It's not too long. This is a Kotlin only contest

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

    Automatic translation from other programming languages to Kotlin is not allowed. I've added this information to the announcement.

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

      Thank you for the clarifications.

      I find it funny to see that the Intellj Java to Kotlin converter (which is the only other good non-AI translator I can think of), is now banned collaterally — something that had been used for 5 years already ever since the first Kotlin Heroes.

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

      Can it be more publicly announced? Right now, it is hiding in a small portion of an announcement

      Especially because previously contestants did do it and were not penalized.

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

Thank you for your comments and questions! Since the goal of the contest is to encourage participants to try Kotlin, we ask that you do not use AI to solve the problems or translate solutions from other languages.

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

Since language translation is not allowed, does some know any quick source of learning the basics of kotlin? like in an hour or something

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

is it rated?

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

Is it rated?

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

This contest is not rated, But If you can solve at least one problem, you'll have a chance to win a t-shirt

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

https://ibb.co/ggmMyP6 Can I know when I'll get my t-shirt?

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

thanks to everyone involved for helping me realize how superior c++ is

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

if you search for an online IDE https://onecompiler.com/kotlin this works well.

I struggled a lot for finding a working website at the beginning of the contest. so here you go for the future contests.

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

Is it normal to use java ArrayList over the Kotlin native List?

Not very familiar with Kotlin... was just using what ever compiles.

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

    You can but there is not much reason to I think. Kotlin data structures are more convenient, e.g.:

        val xs = listOf(1, 2, 3)
        val mxs = mutableListOf(1, 2, 3)
        val kotlin_map = mapOf('A' to 1, 'B' to 2)
    

    Since you have immutable data structures you can also do reliable hashing, etc.

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

problem G is really funny troll problem, made my day lol

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

I'm curious why my O(N) solution to E is getting TL. Is there something particularly slow in Kotlin among the things I'm doing?

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

Why I can't see solutions submitted by other contestants after contest? No open-hacking phase? No tutorial?

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

Will it be possible to submit solutions after the contest?

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

Thank you for participation! We hope you enjoyed the problems.

The current version of the editorial (no problem I, some other problems might be unpolished) is available here.

Also, these are our model solutions to the problems:

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

After the entire contest, I realized there is only one sheep in problem D LOL :(

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

This was my first time trying Kotlin and participating in the Kotlin Heroes contest. It was a great experience, and I enjoyed it so much! I'm looking forward to joining future contests and improving my skills in Kotlin.

Here are the resources I used to learn Kotlin:

  1. Kotlin Tour

  2. Kotlin Koans

  3. Kotlin for Competitive Programming

Thanks for the awesome contest and the great problems!

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

It was fun trying out Kotlin, got mixed up with types a lot. I had this problem where I did a for loop and compared i to a long value inside, so it autoconverted i to long and then all of my array indexing with i threw errors, I was so confused for a good bit lol

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

I definitely needed more time learning types and Kotlin syntax but I will say using the IntelliJ IDE made this contest feel very fun and refreshing. Very cool problems too, even though I didn't get to solve the harder ones, I liked the problems I was reading.

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

Are the raffles selected yet? Or will only the winners know?

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

Is it possible to continue submitting code to practise round? It shows contest is over.

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

Why can't we view the solutions of other participants???

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

Can I solve the problems in any language or only kotlin?

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

Hi BledDest are the raffles seleceted yet for tshirts...?

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

    I guess yes but I am not sure as I received a text regarding prize and there has been no follow up since then, the text was something like :

    "Hello, frissky9! We are pleased to inform about your award for "Kotlin Heroes: Episode 11".

    Congratulations!"

    waiting for updates! BledDest

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

      I don’t know why no one has posted/commented about it yet, but here’s the message I received from System.

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

Who are the winners, can you explain, 2 weeks have been passed.