[here](http://codeforces.com/contest/785/problem/E)
here