Why am I getting WA on problem:http://www.spoj.com/status/STRNGSLV/
Here is my code:http://ideone.com/HZU1KS
If I'm understanding the problem statement correctly, the task would be to find the longest sub-string he can tolerate, and yet it says WA.