BledDest's blog

By BledDest, 18 months ago, translation, In English

First of all, I would like to thank all testers of the round: elizarov, IlyaLos, nuipojaluista, hg333, nooinenoojno, winger, neko_nyaaaaaaaaaaaaaaaaa, kort0n, hos.lyric and Roms. Also huge thanks to co-authors of the contest: Neon, adedalic, vovuh and awoo.

I hope you enjoyed participating in the round!

Okay, now for the editorial itself:

1431A - Selling Hamburgers

Idea: BledDest, preparation: BledDest

Tutorial
Solution (elizarov)

1431B - Polycarp and the Language of Gods

Idea: BledDest, preparation: awoo

Tutorial
Solution (elizarov)

1431C - Black Friday

Idea: Neon, preparation: Neon and awoo

Tutorial
Solution (elizarov)

1431D - Used Markers

Idea: BledDest, preparation: adedalic

Tutorial
Solution (elizarov)

1431E - Chess Match

Idea: BledDest, preparation: BledDest

Tutorial
Solution (Ne0n25)

1431F - Neural Network Problem

Idea: vovuh, preparation: vovuh

Tutorial
Solution (vovuh)

1431G - Number Deletion Game

Idea: BledDest, preparation: BledDest

Tutorial
Solution (Ne0n25)

1431H - Rogue-like Game

Idea: BledDest, preparation: Neon

Tutorial
Solution (Ne0n25)

1431I - Cyclic Shifts

Idea: Neon, preparation: Neon

Tutorial
Solution (Ne0n25)

1431J - Zero-XOR Array

Idea: Neon, preparation: Neon and adedalic

Tutorial
Solution (Ne0n25)
 
 
 
 
  • Vote: I like it
  • +56
  • Vote: I do not like it

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

Unfortunately, not all editorials are finished by now, but the missing ones will be posted in a couple of hours.

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

    I tried to create mashup but it shows you do not have access to the problem.

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

Thanks guys — great contest. I decided to learn some Kotlin because there were no other contests for a whole week, and it's been fun, both today and the practice round. I'll try again in the future for sure.

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

when winners are announced? who got a tshirt?

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

I really liked problems E and F. Thank you!

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

    can you explain the aproach.i could not understand solution from editorial why cyclic shift work?

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

did anyone get a flow/matching solution to pass for E?

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

    I considered this but I couldn't see how to get Hungarian to work in the time constraints. Will be interested to know if anyone did manage, as that was also my first thought but then I moved on to cyclic permutations.

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

For Problem A:

I use intelij with kotlin 1.4, and the solution:

a.sortedDescending().withIndex().maxOf { (it.index + 1) * it.value } throws Kotlin: Unresolved reference: maxOf

any suggestion?

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

    This modifeid solution of Problem A in the Editorial works in my intellij with kotlin 1.4

    fun main() {
      repeat(readLine()!!.toInt()) {
        val n = readLine()!!.toInt()
        val a = readLine()!!.split(" ").map { it.toLong() }
        val answer = a.sortedDescending().withIndex().maxBy {  (it.index + 1) * it.value }
        println((answer!!.index+1) * answer!!.value)
      }
    }
    
»
18 months ago, # |
  Vote: I like it 0 Vote: I do not like it

How will we get certificates of participation for Kotlin Heroes 5 and when?

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

Does anybody understand explanation of task E?