I am not able to figure out why my code is giving TLE. I have implemented Rabin Karp but the time limit is 5s so it should pass. Please help.
http://ideone.com/YP70zahttp://www.spoj.com/problems/NHAY/