## Search Hot search: Activities Personals Discuz

# It should be a DP issue.

Newbie Credits
2 China Post time: 2020-2-1 15:40:01
| Show all posts |Read mode
 Given a sequence A consisting of n 1s and n -1s, if the sequence A satisfies S (i, A)> = 0 (1 <= i <= 2n) (S (i, X) represents the previous sequence X i term sum), then call it sequence B, given the integer n, find the number of sequences B that satisfy the condition. Given an integer n (2 <= n <= 3000), find the number of sequences B that meet the above requirements

Newbie Credits
2 Invalid IP Address Post time: 2020-3-21 19:00:02
| Show all posts
 Is it possible to do this: first create an array (length 2n), the array is used to store the sum of the first k + 1 items of the array index k, and then start a loop to count, the sum of the array> = 0 then ++ . Last print number

Newbie Credits
4 China Post time: 2020-4-19 20:45:01
| Show all posts
 The sequence b consisting of n 1s and n-1s, and the m digits in front of the sequence are 1, the m-1th is -1, the number of such sequences is set as a [n] [m], Then a [n] [m] = a [n-1] [m-1] + a [n-1] [m] + ... a [n-1] [n-1] And a [n]  + a [n]  + ... + a [n] [n] is the result of lz

Newbie Credits
3 China Post time: 2020-4-25 17:15:02
| Show all posts
 Looks like there is a mathematical solution, without DP