temp1967's blog

By temp1967, history, 6 months ago, In English

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.

Full text and comments »

  • Vote: I like it
  • -4
  • Vote: I do not like it

By temp1967, history, 6 months ago, In English

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

Full text and comments »

  • Vote: I like it
  • +5
  • Vote: I do not like it