Looking at language statistics in last rounds I have wondered why so many Java and so extremely low Kotlin coders?
Codeforces Round #797 (Div. 3)
CodeCraft-22 and Codeforces Round #795 (Div. 2)
Educational Codeforces Round 129 (Rated for Div. 2)
Kotlin, in rude of sense, is modern replace for Java.
If you are Java-coder then I am curious why you not change Java to Kotlin?
I don't want to note basic advantages of Kotlin which described everywhere. But it is language with modern syntax, and I think it is cool for cp almost as Python. I have more than one year experience of coding in Kotlin (but not cp!!), and I can describe my feelings as "I will never write even single line again in Java".
segments.sortWith(
compareBy<Segment> { it.l }
.thenByDescending { it.r }
.thenBy { it.id }
)