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

Hello, Codeforces!

First and foremost, we would like to say a massive thank you to everyone who entered and submitted their answers to the first, second and third Kotlin Heroes competitions which were held previously. Congratulations to the top 3 winners:

Episode 1

  1. Petr
  2. ecnerwala
  3. eatmore

Episode 2

  1. tourist
  2. eatmore
  3. Benq

Episode 3

  1. Egor
  2. tourist
  3. Benq

Ready to challenge yourself to do better? The fourth "Kotlin Heroes" competition will be hosted on the Codeforces platform on May/29/2020 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. 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 a practice round, where you can try to solve a few simple problems in Kotlin. All the solutions are open, which means that you can look at the solution even if you haven't solved the problem yet. The practice round is available by the link.

We wish you luck and hope you enjoy Kotlin.

UPD: The editorial can be found here. Thank you for participation! I hope you enjoyed the problems.

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

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

badge into sticker?

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

do you send t-shirts to any country? That costs alot I think

»
5 лет назад, # |
  Проголосовать: нравится -60 Проголосовать: не нравится

When there would be a normal, non-kotlin div3 contest...

»
5 лет назад, # |
  Проголосовать: нравится -75 Проголосовать: не нравится

its a bad idea to accept one language.

»
5 лет назад, # |
  Проголосовать: нравится -21 Проголосовать: не нравится

This part may need to be clarified:
who had previously made the last successful submission

e.g.
Person 1 solves A after 15 minutes, B after 45 and C after 120 minutes.
Person 2 solves A after 20 minutes, B after 40, submits the same solution for B again after 119 minutes and solves C after 120 minutes.

They have the same penalty, which one should have the advantage?

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

    I don't quite understand why my question was downvoted this much, does it have an obvious answer?

    If the answer is obvious, can someone at least share it here? An explanation would be nice as well.

»
5 лет назад, # |
  Проголосовать: нравится -41 Проголосовать: не нравится

Is it rated?

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

tourist is solving one problem in every three minutes

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

k * + k < 100

Why this expression is correct in Kotlin ?

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

Is it possible to get problems open for other language e.g. create a contest in the gym?

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

MikeMirzayanov, something needs to be done about alt accounts. It seems like there are more alt accounts than regular accounts participating in this contest, just so they can be entered into the draw for the random t-shirts, and this is really not fair. I will try to expose some cheaters with alts after it ends.

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

    JetBrains promotes this contest in social media/kotlin blog/ADs etc so it's expected that much people outside of CP community will participate in it.

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

      I can assure you there is a lot of cheating going on, I am a member of some other forums for competitive programming in a different language, and it is currently being discussed there. Sadly I cannot say any further or I will be identified and will lose favour with people who can control if I go to olympiads in the future or not...

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

      People were probably using multiple accounts in order to increase the odds of getting the random T-Shirt.

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

    MikeMirzayanov will nothing be done of this? I think it's unfair for both participants and JetBrains, who kindly arranged for cash prizes as well as 100 t-shirts for the contest, that people end up getting multiple t-shirts because they spam alt accounts. People ended up solving A in the first 5 mins, and spent the remaining 2 hrs 28 mins using alts that have been created months or even years ago, writing code that is different to their original one so they are not identified...

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

      People ended up solving A in the first 5 mins, and spent the remaining 2 hrs 28 mins...

      your math is blowing my mind

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

      I think they can simply use a clause like a "trusted participant" for random T-shirts if alt accounts is the problem and I can only hope someone isn't so free in their life to maintain more than one "trusted participant" account.

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

    LOL someone just spammed this with alts and made it go down by -4 in under a minute, nice to see the alts being put to good use even after getting a t-shirt

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

    Let them have the T-shirts. I'm sure they don't have many clothes to wear.

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

I wrote my first code in kotlin in this contest . I feel it similar to JAVA and Luckily by googling and seeeing some previous submissions I solved 2 problems though 3rd one was hard to implement in Kotlin for me! Hope to get a random Tshirt

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

Am I the only one who solved A with binarysearch :P + I found C easier than B Idk why not so many solved it

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

Thank you for the problems! Feel not too easy, not too hard, just the right thing to learn a couple language features at a time.

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

for the first time solved in kotlin :D
actually did this contest for checking my luck :P
hope to get a t-shirt :P

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

using seed = 284 and len = 1044 as mentioned here, random winners list should be

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

    Why len == 1044? (May be because virtual participants already started?) Because for now len = 1056

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

    Man! I miss it by one. Sad.

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

    There's no 117 position ( there are two 116 positions) who will get the t-shirt now?

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

      Maybe use this rule "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."?

      (I hope that I can get the T-shirt.

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

Can anyone describe the solution to F. I was thinking maybe binary search but I don't know how to account for the updates.

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

    Basically we can treat rows and columns differently, just find the row that minimizes the cost of moving between rows only as well as find the column which does the same with columns. So basically we can reduce this 2D problem to two 1D problems, an 1D problem can be solved easily, it's quiet well known I think that these distances are minimized when we choose the median.

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

Waiting for editorial.. :)

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

I like that feeling of realization that even if I do not win a T-shirt, my participation will completely change everyone who receives it, because of random with +1 person in list. I influenced the fate of dozens of people :D Who knows, maybe exactly YOU will get T-shirt because of my participation. Ah, do not thank))

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

Good to code in Kotlin for the first time. Found that there are many altenatives to do the same basic things and also that it is very similar to JAVA. I missed the fact that the 3rd problem needed handling of long. This must have the case for all who got Wrong Answer on Test Case 5

»
5 лет назад, # |
  Проголосовать: нравится -6 Проголосовать: не нравится

Kotlin is not bad at all.

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

When will we see the list of the winners?

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

When will the list of winners (random) be out?

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

Our congratulations to the t-shirt winners (top 50 + random 50)!

List place Contest Rank Name
1 1346 1 tourist
2 1346 2 Golovanov399
3 1346 3 eatmore
4 1346 4 pashka
5 1346 5 Potassium
6 1346 6 natsugiri
7 1346 7 Egor
8 1346 8 uwi
9 1346 9 TadijaSebez
10 1346 10 xiaowuc1
11 1346 11 knightL
12 1346 12 conqueror_of_tourist
13 1346 13 sokian
14 1346 14 ondrah
15 1346 15 Sugar_fan
16 1346 16 camypaper
17 1346 17 JettyOller
18 1346 18 galen_colin
19 1346 19 waynetuinfor
20 1346 20 gafeol
21 1346 21 pitfall
22 1346 21 senjougaharin
23 1346 23 SYury
24 1346 24 koboshi
25 1346 25 cookiedoth
26 1346 26 LastDance
27 1346 27 Jatana
28 1346 28 darkkcyan
29 1346 29 user202729_
30 1346 30 shilov
31 1346 31 nuip
32 1346 32 tabr
33 1346 33 clyring
34 1346 34 linjek
35 1346 35 LamoreauxAJ
36 1346 36 tatyam
37 1346 37 benibela
38 1346 38 romanandreev
39 1346 39 lucifer1004
40 1346 40 nmakeenkov
41 1346 41 pwild
42 1346 42 Tlatoani
43 1346 43 Bedge
44 1346 44 PugachAG
45 1346 45 Infoshoc
46 1346 46 Aleks5d
47 1346 47 james007
48 1346 48 cristian1997
49 1346 49 timmyfeng
50 1346 50 artsin666
80 1346 80 amelentev
91 1346 91 blyat
106 1346 106 Mur
117 1346 116 JinhaiChen
148 1346 148 aekt
159 1346 159 Danzev
166 1346 166 Cifko
177 1346 177 fan__of_potterr
178 1346 178 Respect2D
204 1346 204 Kopali
233 1346 233 max-martynov
246 1346 245 UD_xlinsist
285 1346 285 hghgrtut
291 1346 291 bishnu_chanda
297 1346 297 sashamc
300 1346 300 Visors
302 1346 301 rmnv
308 1346 308 Zero23
325 1346 325 Vedensky
328 1346 328 Denx24x
347 1346 347 docjyJ
360 1346 359 IamLev
395 1346 393 vats0726
397 1346 393 Programmer
427 1346 427 algakzru
429 1346 428 DragoPhoenix
464 1346 464 Dimer15
473 1346 469 aabzac
505 1346 505 serserkov
532 1346 531 alexeydmitriev
557 1346 557 IZOBRETATEL777
564 1346 563 cjh5414
613 1346 613 anton.hofmann15
615 1346 615 betz95
628 1346 628 DanWallgun
648 1346 646 hridayesh11
669 1346 663 hrynb
682 1346 678 ani37
706 1346 704 EricCen
719 1346 716 Sameh
738 1346 737 xor_pilot
766 1346 757 zbsnb
786 1346 783 Mani
789 1346 783 RandYan
835 1346 835 maks23814300
846 1346 844 masood_
940 1346 937 FedeNQ
955 1346 952 my_little_pony_2004
1030 1346 1028 koshenkova
1066 1346 1063 trendingaj
»
5 лет назад, # |
  Проголосовать: нравится +8 Проголосовать: не нравится

I wish to have at least one more round summertime

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

Hope more episode of Kotlin Heroes comes out. I am looking forward it because of the prizes and more extraoridinary problems for practicing Kotlin.

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

Why it shows that I solved 5 out of 5 in this contest but actually I do not solve any one. Actually I did not even registered for this.