what is approach of solving MINUS on SPOJ?
I am assuming that you have found out the sequence of $+$ and $-$ which lead to getting the final result as the required integer $m$.
One observation here is that the sequence of $+$ and $-$ of length $n$ (size of array) will always start with $+$ $-$, and remaining integers can be either $+$ or $-$. To clarify: if the array is $a_1, a_2, a_3, a_4, a_5, \ldots, a_n$ then $m= +a_1-a_2 \# a_3 \# a_4 \# \cdots \# a_n$,
where $\#$ is either $+$ or $-$.
Now to decipher the order in which operations should be carried out to get such a sequence we first look at the rightmost $-$ in the sequence.
For example, let the integers be $5,8,1,6,2,12$ and $m=6$.
One way to get this is $+5-8+1-6+2+12$.
The rightmost $-$ is near $6$.
Let's add parenthesis here to divide the problem into two smaller ones: $(5-8+1)-(6-2-12)$.
Now solve these two smaller problems individually with same idea of rightmost $-$: $(5-(8-1))-((6-2)-12)$.
We can clearly see the operation that is asked in the question.