Strange code error in Lunchtime All Substrings problem. Any help?

Problem - https://www.codechef.com/LTIME76A/problems/ALLSUB
My solution - https://ideone.com/uTGrCx

Why am I getting this error?
terminate called after throwing an instance of ‘std::length_error’
what(): basic_string::_M_replace_aux

Any help would be appreciated. Thank you :slight_smile:

Look at line no. 67 and 68 of your code.

2 Likes

while(t–){
while(t–){

line no 67, 68 :open_mouth::pensive:

1 Like

definitely i was high during contest :neutral_face: