Subarray Sum

Revision en2, by Samarth12, 2019-12-11 11:46:04

Suppose I have an array of positive integers and I concatenate it K times. Now I want to count the number of subarrays with sum<=S Constraints:- N<=10^5(number of elements), S<=10^5 , K <= 10^8 , 1<= A[i] <= 10^9. Any idea?

Tags #subarray, cumulative sum

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English Samarth12 2019-12-11 11:46:04 1 Tiny change: '=10^5 , K = 10^8 , 1' -> '=10^5 , K <= 10^8 , 1'
en1 English Samarth12 2019-12-11 11:29:55 236 Initial revision (published)