it is giving runtime error each time.. i made small changes but all in vein.. http://ideone.com/KoYhtz is my solution problem is: http://www.codechef.com/problems/ACMKANPD/
and i always waste my time in debugging my codes rather than making them..
[any useful tips so that it's AC at one go???]