the link to the prob : http://www.spoj.com/problems/ACODE/
my code : http://ideone.com/i8Di2j
one of the accepted sol : http://ideone.com/WyQBBn
it will give runtime error for string of smaller lengths .
see the error on ideone link .The error is self explanatory
1 Like