Number of subarray having average sum equal to K

Правка en2, от tuanio, 2021-01-28 18:16:49

Hello guys, i have a question like this. Given an array has length n, n <= 10^7, a[i] <= 10^9. Number K <= 10^9. How i can count number of subarray has average sum equal to K. Thanks for your time.

Теги #question

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский tuanio 2021-01-28 18:16:49 3 Tiny change: '10^7, a[i][j] <= 10^9.' -> '10^7, a[i] <= 10^9.'
en1 Английский tuanio 2021-01-28 18:12:05 248 Initial revision (published)