Mixtures Problem Spoj

In the mixture problem

how is sum function really working
m confused
we have to do (a+b)%100 when we mix two mixtures
we bascially have a recurisive soln with two mixtures (i to k) and (k+1 to j) and calculated smoke using sum function

in that we simply added a[i] to a[k] with mod , how is it correct??
we didn’t checked which two are to added first

won’t the result change if we change order of combining.