:tada: Kotlin community now has a place to practic...
# feed
e
🎉 Kotlin community now has a place to practice and test algorithmic programming skills. Welcome JetBrains and Codeforces collaboration at Kotlin Heroes programming contest. You can join #codeforces for discussion. https://blog.jetbrains.com/blog/2019/05/22/kotlin-heroes-programming-contest/
K 19
k
FYI: "Login Failed: You can't use Facebook to log into this app or website because there's an issue with its implementation of Facebook Login."
l
I wish it was on a Saturday (or Sunday) or after 5-6PM so I could join after work.
3
e
What timezone you work at?
l
CEST (Paris time)
e
It should be almost “after work” enough for you, unless you come to work really really late….
l
It's 4:35PM, so I'll be at least 30 minutes late. Is it okay to be late by almost an hour?
e
For your fun — definitely. You’ll still have a chance at winning t-short (you’ll need to solve at least one problem to enter into a draw). You need to register in advance, though. Also, codeforces platform has “virtual contents” so if you just to see how your performance stack up you can even come after its over and participate “virtually” (no prizes for that, obviously).
👍 4
l
I am reading your new tutorial about Competitive Programming, and I'm struggling to understand the point of the following snippet:
Copy code
fun main() {
    var n = readLine()!!.toInt() // read integer from the input
    val reached = HashSet<Int>() // a mutable hash set 
    while (reached.add(n)) n = f(n) // iterate function f
    println(reached.size) // print answer to the output
}
Source: https://kotlinlang.org/docs/tutorials/competitive-programming.html
e
You need to read the problem statement: http://codeforces.com/contest/1157/problem/A
l
Oh, I missed the
+ 1
! Off by one code reading 😅
b
Hopefully the code forces website stops returning 500 errors so more than just their blog can be accessed 😅
e
They had a planned maintenance window. Should be over by now.
👍 1
n
struggling with the "painting doggies". I have it stuck in my head that as long as the initial set contains 2 doggies with the same color, I can make all dogs the same color by recoloring all dogs with that color into a different color from one of the other dogs. However, this results in "Failed".
e
Are you missing a corner case of n=1 maybe?
(Also, better move this discussion to a separate thread on #codeforces channel)
r
Can't sign up. Tried with Google account and email/password. 😕
e
What was the result? 🧵 -> #codeforces