Could someone please give me an explanation on how to solve problem F of SWERC 2014? https://speedyguy17.info/icpc/data/swerc/2014/problemset.pdf
It is a computational geometry problem. I can only solve it in O(n²), but O(n log n) solution is required.
-- Also, if blog posts are not the right place to ask help for problems, I would appreciate if someone could inform me some link or forum to get help, since I constantly get stuck on not-so-easy problems like this.