Someone suggested recording screencasts, I made a poll in my telegram channel (Russian only) and the idea was positively accepted. So, here is my first screencast. I think I will be doing them on every round (if possible) while someone is interested (because it is easy, just 4-5 clicks).
I know that some people would like me to do commentary, but on live rounds I'm trying show my best performance, so it won't happen. But you can suggest some things and maybe I'll do something.
I read Russian problem statements on screencast (because it is more convenient for me), but the code is in C++/Python, so it shouldn't be a problem.
UPD (10.01): I uploaded Hello 2019 screencast and almost uploaded round 530 screencast. I had bad internet connection when I was solving the contest, so I upload only now. Normally I will upload screencasts no more than 30 hours after the contest, so if you are interested in watching it, just go to my channel. I won't make updates like this in the future.







(maybe
(intersect
is standard and
is possible, probably only with library code :)
. So now we play not for components, but for edges. Better, but still not obvious.
. But for calculating
. Turns out this is true, because all RB-edges cancel out.
. Worst case for us is when relative error is maximal. It is logical to make them equal — exactly what we do by binary search with absolute errors.
. We can assume that
so
. Now we have
, but
, so
. How large should be
. Much smaller than
.
or simply
.
(it is basically the same as dividing the segment in binary search).
. Hence 
.
which is
.
. In our case
.
'' part. What if there is no such
otherwise we'll take
.
. If implement this solution carefully — you will get AC =)
. Because of it, if we
such a point will be found and we can decrease
.
time.
. Memory — 