RunTime Error(SIGSEGV) in GIFTSRC

Here is the code link, please help I am new to CodeChef.
https://www.codechef.com/viewsolution/30677877

1 Like

you should check your J array because the maximum size is 1000

1 Like