Help- Counting Ways to Partition an Array into Segments with Positive Sum

Правка en2, от Kr_Shubham, 2024-03-17 16:06:32

Find the number of ways to partition array into segments such that sum of each segments is greater than 0,

Note- Concatenating the segments should result into full array.

Constraints: 1<=N<=10^5 1<=a[I]<=10^9 Example:

Input1: N=3, a[]={-1,-3,7}

Output: 1. (Complete array as one Segment)

Thanks

PS. This is not part of any running Contest.

Теги help me, coding, problem

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский Kr_Shubham 2024-03-17 16:06:32 42 Adding Constraints
en1 Английский Kr_Shubham 2024-03-17 16:02:24 400 Initial revision (published)