How to solve this problem on bitmasks

Правка en1, от DLN, 2020-06-23 09:45:35

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

Теги #bitmask

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский DLN 2020-06-23 09:45:35 272 Initial revision (published)