Problem Link: http://www.spoj.com/problems/RPLE/Even O(r) (worst case) solution is giving TLE.Any hints?
Edit: Cluster was changed, same code got AC.