MatusKo wrote:
maximum sum
We can notice invariant, that whenever we switch 1 to -1 or -1 to 1 sum changes its value by 10.
This is not true. If you change the sign of one number, it just changes the sign of the 10 products containing it. The change of + to - and - to + may be balanced.
My solution:-
I think we can get the sum 995
The sequence formed by the repitition of the block +1,-1,-1,-1,-1 and in this sequence the last block is +1,-1,-1,-1.
In this sequence the sum is 995.
It is the maximum because we will surely get two -1 products.