Пожалуйста, прочтите новое правило об ограничении использования AI-инструментов. ×

Counting Subarrays!

Правка en2, от nHimanshu, 2023-05-16 20:44:56

Problem Description

Given an array A of N length and you are also given number B.

You need to find the number of subarrays in A having sum less than B. We may assume that there is no overflow.

Problem Constraints 1 <= N <= 100000 -100 <= A[i] <= 100 0 <= B <= 10000

Example: INPUT:: A----> [1,−2,4,8] k=0 OUTPUT:: 2

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en3 Английский nHimanshu 2023-05-16 20:49:42 45
en2 Английский nHimanshu 2023-05-16 20:44:56 2 Tiny change: '] <= 100\n1 <= B <= 1' -> '] <= 100\n0 <= B <= 1'
en1 Английский nHimanshu 2023-05-16 20:43:10 358 Initial revision (published)