A week with Merlin
http://petr-mitrichev.blogspot.com/2015/08/codeforces-round-315-gave-this-week.html