Help with square root decomposition
How to solve http://codeforces.me/contest/242/problem/E problem with square root decompositatio?