By BledDest, 4 years ago, In English

Hello, Codeforces!

First and foremost, we would like to say a massive thank you to everyone who entered and submitted their answers to the five Kotlin Heroes competitions which were held previously: Episode 1, Episode 2, Episode 3, Episode 4, and Episode 5: ICPC Round.

Ready to challenge yourself to do better? The Kotlin Heroes: Episode 6 competition will be hosted on the Codeforces platform on Mar/09/2021 17:35 (Moscow time). The contest will last 2 hours 30 minutes and will feature a set of problems from simple ones, designed to be solvable by anyone, to hard ones, to make it interesting for seasoned competitive programmers.

Prizes:

Top three winners will get prizes of $512, $256, and $128 respectively, top 50 will win a Kotlin Heroes t-shirt and an exclusive Kotlin sticker, competitors solving at least one problem will enter into a draw for one of 50 Kotlin Heroes t-shirts.

Registration is already open and available via the link. It will be available until the end of the round.

The round will again be held in accordance with a set of slightly modified ICPC rules:

  • The round is unrated.
  • The contest will have 9 problems of various levels of complexity.
  • You are only allowed to use Kotlin to solve these problems.
  • Participants are ranked according to the number of correctly solved problems. Ties are resolved based on the lowest total penalty time for all problems, which is computed as follows. For each solved problem, a penalty is set to the submission time of that problem (the time since the start of the contest). An extra penalty of 10 minutes is added for each failed submission on solved problems (i. e., if you never solve the problem, you will not be penalized for trying that problem). If two participants solved the same number of problems and scored the same penalty, then those of them who had previously made the last successful submission will be given an advantage in the distribution of prizes and gifts.

REGISTER →

If you are still new to Kotlin we have prepared a tutorial on competitive programming in Kotlin and Kotlin Heroes: Practice 6, where you can try to solve a few simple problems in Kotlin. The practice round is available by the link.

We wish you luck and hope you enjoy Kotlin.

Announcement of Kotlin Heroes: Episode 6
Announcement of Kotlin Heroes: Practice 6
  • Vote: I like it
  • +168
  • Vote: I do not like it

| Write comment?
»
4 years ago, # |
  Vote: I like it +29 Vote: I do not like it

Could you set -jvm-target kotlinc flag to 1.8+ (default is 1.6)?

Currently it's impossible to use static methods on interfaces (e.g. Comparator.reverseOrder()).


import java.util.Comparator

fun main() {
    val list = mutableListOf("Hello", "World")
    list.sortWith(Comparator.reverseOrder())
    println(list)
}

fails with

Invocation failed [COMPILATION_ERROR]
Can't compile file:
program.kt:5:30: error: calls to static methods in Java interfaces are prohibited in JVM target 1.6. Recompile with '-jvm-target 1.8'
    list.sortWith(Comparator.reverseOrder())
                             ^
Unable to find classes\programkt.class 
  • »
    »
    4 years ago, # ^ |
      Vote: I like it +43 Vote: I do not like it

    Thanks, I'll add it. But I prefer to do it after this round. I don't want to make changes to the settings before an important round.

  • »
    »
    4 years ago, # ^ |
      Vote: I like it +24 Vote: I do not like it

    Done.

»
4 years ago, # |
  Vote: I like it 0 Vote: I do not like it

I just have a question how can we change a char in a string in kotlin.. why its so wrong to do it like other languages
s="hold"; s[0]='g' that just doesn't work

  • »
    »
    4 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    the strings and a lot of other objects are immutable for simplicity. For example, it simplifies the creation of a substring — just put the pointers at the beginning and end of the substring

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

    If you need a mutable String-like object, try StringBuilder.

    val s = StringBuilder("test");
    s[0] = 'g';
    s.append(s);
    println(s); // gestgest
    
»
4 years ago, # |
  Vote: I like it -56 Vote: I do not like it

can i use c++ in this contest??

  • »
    »
    4 years ago, # ^ |
      Vote: I like it +7 Vote: I do not like it

    Yes of course this is Kotlin contest already

  • »
    »
    4 years ago, # ^ |
      Vote: I like it -8 Vote: I do not like it

    No you're only supposed to use Kotlin in this contest...

    • »
      »
      »
      4 years ago, # ^ |
        Vote: I like it -64 Vote: I do not like it

      but why man. problem solving should have no boundary. one should use whatever he is comfortable with.

      • »
        »
        »
        »
        4 years ago, # ^ |
          Vote: I like it +30 Vote: I do not like it

        Because this is a contest made specially for Kotlin? It's the freedom of the setters to do whatever they want with their round, specially since this round is sponsored by JetBrains. If they want to promote Kotlin by making a Kotlin-only contest, they can do so.

  • »
    »
    4 years ago, # ^ |
    Rev. 2   Vote: I like it +34 Vote: I do not like it

    You are only allowed to use Kotlin to solve these problems.

    People blind or what ?

»
4 years ago, # |
  Vote: I like it +16 Vote: I do not like it

Note-People who won’t be able to participate in the contest, and want to solve the problems afterwards in their favorite languages can create mashups and do that.

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

can we get a kotlin remix of this to listen to in contest? https://www.youtube.com/watch?v=WMiELYCfyJA

»
4 years ago, # |
  Vote: I like it -18 Vote: I do not like it

Interesting Round.

Surprised with no graph problem (from A to G). Seems like writing graph template went to waste :P

»
4 years ago, # |
  Vote: I like it +15 Vote: I do not like it

Fun experience, first round in Kotlin, feels fresh to use

»
4 years ago, # |
  Vote: I like it +8 Vote: I do not like it

Today I learnt to check whether I copied a template with val when I supposed to use var

»
4 years ago, # |
  Vote: I like it -22 Vote: I do not like it

Tried Kotlin first time my clean solution to C.

Spoiler
»
4 years ago, # |
  Vote: I like it +10 Vote: I do not like it

Codeforces these days be like:

»
4 years ago, # |
  Vote: I like it +30 Vote: I do not like it

When will the Random T-shirt winners will be announce?

  • »
    »
    4 years ago, # ^ |
      Vote: I like it +39 Vote: I do not like it

    I recently saw an interesting blog which I think you might want to take a look at. In particular, the second link in the blog will probably be of interest. What are your thoughts on it?

    • »
      »
      »
      4 years ago, # ^ |
      Rev. 2   Vote: I like it +19 Vote: I do not like it

      I guess it would be cool to detect plagiarism in this round as it's detected in regular rounds

      • »
        »
        »
        »
        4 years ago, # ^ |
        Rev. 2   Vote: I like it +4 Vote: I do not like it

        All these accounts that are in these blog are created a few hours before the contest. It would be cool if jetbrains implies a new rule that you must have to participate at least one rated contest before to be eligible for the prize. Sad thing is these people are participating the contest just because of a t-shirt not for learning a new language.

»
4 years ago, # |
  Vote: I like it +51 Vote: I do not like it

T-shirt winners????

»
4 years ago, # |
  Vote: I like it +65 Vote: I do not like it

please give updates about random tshirt winners

»
4 years ago, # |
  Vote: I like it 0 Vote: I do not like it

When will the T-shirts winners be announced? It has been more than two days since the contest ended!

  • »
    »
    4 years ago, # ^ |
      Vote: I like it +40 Vote: I do not like it

    I think we should be patient.

    Last time the winners list was announced one week after the contest.

    We all should consider the amount of work that Mike and CodeForces staff are making to operate the website. Angry comments don't show such gratitude and may demotivate them.

    We will eventually know the winners. A few days delay is not a big deal anyway because the prizes take much longer to be received.

    • »
      »
      »
      4 years ago, # ^ |
        Vote: I like it +18 Vote: I do not like it

      That could be avoided by announcing approximate date of raffle. But I agree that asking the same question over and over again will change nothing.

»
4 years ago, # |
  Vote: I like it +48 Vote: I do not like it

When? ;-;

»
4 years ago, # |
  Vote: I like it +27 Vote: I do not like it

Are the winners list out or any information on when it'll be out?

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

thanks for pushing me to learn kotlin