Home > Back-end >  The dp solution circular array maximum continuous fields and problems
The dp solution circular array maximum continuous fields and problems

Time:11-12

Topics are as follows:
Cyclic sequence of N integers a [1], a [2], [3], a... , the sequence as a [n], a [I] + [I + 1) + a... + a [j] continuous period and the maximum value (the number refers to the n cycle sequence into a circle, so you need to consider a [n - 1], a [n], a [1], [2] such a sequence), when the integer are given negative and 0,
For example: - 2, 4, 13, 5, 2, and the largest child period is: 11, 4, 13, and is 20,



I want to ask whether this problem can be, as two of the same original array fore and aft connection, form an array of 2 times the original long, in the continuous period and largest, continuous period of not more than n, the length of the son,,,
I think it is ok, but why, I do this topic on 51 nod, there is always a 5 or 6 sets of data to pass

CodePudding user response:

Have to data range?
  • Related