I've tryed to make a program which one calculate the maximum subsequence from a vector.
example:
ss1.in : 7
5 -6 3 4 -2 3 -3
ss1.out : 8 3 6
Subsequence maximum is (3, 4, -2, 3) which one sum is 3 + 4 - 2 + 3 = 8 and it start on the position 3 and it end on position 6 (ss1.out 8(sum) 3(start position) 6(end position)
When i try to compile it i gives me error:
0xC00000FD
Make the array size less than 6000001. Would it be enough if the array size wil be equal for example 100?
Also take into account that indexes of arrays start from 0.
constexpr std::size_t NMAX = 6000001 ;
int main()
{
staticint s[NMAX] ; // **** change storage duration to static
// TODO: fix the errors in the rest of the code.
}