DLN's blog

By DLN, history, 4 years ago, In English

Problem Statement — Given an array count the no. of distinct pairs of elements such that their AND(&) is an exact power of 2.

array size <= 1e5 and 1 <= a[i] <= 2^12

Example — array -> [10 7 8 2 3] ; answer = 6

Full text and comments »

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