A week with two rows
http://petr-mitrichev.blogspot.com/2017/04/a-week-with-two-rows.html
Codeforces Round 1137 Solution Discussion