find the matching between these 2 slolutions?
http://www.codechef.com/viewsolution/3530837
http://www.codechef.com/viewsolution/3526359