Блог пользователя temp1967

Автор temp1967, история, 2 недели назад, По-английски

Given an array of size n and there are q queries with each query having a value. Want to find number of subarrays with or equal to the query value. 1<=n<=10^5; 1<=q<=10^5; A small hint I know was number of distinct or values in a subarray is 32*n; please prove it also.

Полный текст и комментарии »

  • Проголосовать: нравится
  • -4
  • Проголосовать: не нравится

Автор temp1967, история, 4 недели назад, По-английски

Can any one tell how can we find the pairs in an array such that LCM(a[i],a[j]) is equal to k where k<= 10^6 and 1<=i,j<=n where n<=10^5 also a[i] for any 1<=i<=n a[i]<=10^6 and also a[i] and a[j] are factors of k

Полный текст и комментарии »

  • Проголосовать: нравится
  • +5
  • Проголосовать: не нравится