the below array ab is a random permutation of a and b elemnts and then zeros are inserted.
ab = 5 2 6 0 4 9 8 7 0 1 10 0 3
I want to apply this condition on the between zeros of array ab:
the condition is that if the values of the corresponding values of x(a) and x(b) for a and b elemnts between zeros are greater than t, in this case add a penalty of 100. Then acummulate the total penalty of these between zeros values
This condition includ the mix case of 1-5 and 6-10 between zeros and the individaul case like 3 at the end of ab.