sahil0307's blog

By sahil0307, history, 5 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