vidit_123's blog

By vidit_123, history, 7 years ago, In English

Given an array,how to solve queries (10^5) of type Q:Value,L,R where value is a number and we need to report the count of all the numbers in the range [L,R] of the array such that gcd(Value,A[i])>1 where L<=i<=R. Given ARRAY SIZE :- 10^5 Each number 1<= A[i] <=10^5 TL = 1 Sec

Full text and comments »

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