Run error in one the case what is my mistake

Take the size of array as : a[100005], then try to submit your code.