Getting SIGBART Error in CODECHEF IDE

i am getting SIGBART Error in codechef ide but its working well in my ide, why is it so?
problem link:-Contest Page | CodeChef
code link:- Solution: 41304181 | CodeChef

1 Like

Mixing fast IO, C-style input and C++-style input is a recipe for disaster.

4 Likes

Segmentation Fault occurs when your code tries to access invalid memory locations. I am new to CPP, but aren’t you supposed to free the memory you have dynamically created at run time using new operator?
If it is required, using it would probably fix that.

You may refer the following links
Stack Overflow
https://www.quora.com/What-is-Abort-called-error-in-hackerrank

thanx bro, replacing scanf with cin worked

1 Like