working fine on PC but SIGSEGV here

http://www.codechef.com/viewsolution/6604194
please point out the error.

2 Likes

I declared arrays “a” and “b” globally in your solution and it gave wrong answer . Check here. Now, you have to implement correct logic of the problem.

I am interested in this topic, thank the experts advise …
homemate