Special Subarray

Правка en1, от TalentnotDefined, 2023-07-13 20:12:59

You are given an array arr of size N of non negative integers. Find number of subarrays of array which are special. A subarray is special if product of its maximum and minimum element in divisible by length of the subarray.

Find Number of special Subarrays.

1 <= N <= 10^5 0 <= arr[i] <= 30

Can anyone tell me approach for this problem?

Теги problem, subarray

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en4 Английский TalentnotDefined 2023-07-13 21:38:49 4 Tiny change: ' <= 1000\n1 <= N < 5*10^4\n0 <= arr' -> ' <= 1000\n\n1 <= N < 5*10^4\n\n0 <= arr'
en3 Английский TalentnotDefined 2023-07-13 21:38:35 36 Constraint Updated
en2 Английский TalentnotDefined 2023-07-13 20:16:33 2 Tiny change: ' <= 10^5\n0 <= arr' -> ' <= 10^5\n\n0 <= arr'
en1 Английский TalentnotDefined 2023-07-13 20:12:59 363 Initial revision (published)