http://www.codechef.com/viewsolution/6604194 please point out the error.
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