Page 2 of 2

Re: 10747 - Maximum Subsequence

Posted: Thu Feb 27, 2014 11:11 pm
by brianfry713
To pick 12 of 13 you have 13 choices.
If you don't include the 0 the product will be negative as you have 3 negatives. So the maximum product will be 0.
The maximum sum occurs when you don't include the -48, so the correct answer is 102 and that agrees with my updated AC code.
The judge's input must not have a case like this if other AC codes give different answers.