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

Автор nagato_uzumaki, история, 3 года назад, По-английски

Given an array of length n (n<= 5*10^5) and a number k (k<=10^3), We need to count number of pairs in array whose bitwise and is greater than k. Please share your approach, as I am not able to think the effiecient solution.

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

»
3 года назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

Isn't this the classic trie data structure problem?

  • »
    »
    3 года назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    I appreciate at least you tried to share some knowledge on this topic but suppose you asked a problem and someone replied that isn't it a classical FFT problem, same sounds to me but I will be glad if u can share the link if this is a classical trie ds problem because I was not able to find this on google.