A greedy week
http://petr-mitrichev.blogspot.com/2016/04/a-greedy-week.html
Codeforces Round 952 Solution Discussion