the link to the prob : SPOJ.com - Problem ACODE
my code : i8Di2j - Online C++0x Compiler & Debugging Tool - Ideone.com
one of the accepted sol : WyQBBn - Online C++0x Compiler & Debugging Tool - Ideone.com
it will give runtime error for string of smaller lengths .
see the error on ideone link .The error is self explanatory
1 Like