Why is this giving SIGABRT error?

https://www.codechef.com/viewsolution/29883621

It’s likely because of your free operations. You are freeing memory that is not technically available to you.

Try using C++ style strings instead!

	char str[N];
	scanf("%s",&str);

Same mistake as this guy :slight_smile:

1 Like