For two questions my code is getting TLE even when my solution is following the editorial. Could anyone elaborate my problem ,is the problem with I/O
http://discuss.codechef.com/questions/7269/firesc-editorial
http://www.codechef.com/viewsolution/2896103