How to solve this problem from Google APAC Test ?
https://code.google.com/codejam/contest/5254486/dashboard#s=p3 Thanks in advance.
Repeated Problem:
http://codeforces.com/blog/entry/46414
Repeated Problem:
http://codeforces.com/blog/entry/46414