http://codeforces.com/contest/368/problems