RUNTIME ERROR for THE LEAD GAME problem

Hello guy’s , i tried everything but still my code is getting runtime error , please help.

here is my code : https://ideone.com/2hOEB0

Hey there are two problems 1st change the dimensions of array to either 10000 or according to test cases…
2.What if one of your vectors is empty.put check conditions
Link To Your Corrected Code https://www.codechef.com/viewsolution/18698284