The smallest subset with maximum bitwise OR.

Правка en2, от elements, 2020-04-17 17:55:53

Can someone help me with this problem.

Given an array A of N numbers. We are required to find the size of the smallest subset of the array such that Bitwise OR is maximum possible.

$$$1 \leq N \leq 10^5$$$

$$$1 \leq A[i] \leq 10^6$$$

Sample input:
5
1 2 3 4 5

Sample output: 2

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский elements 2020-04-17 17:55:53 7 Tiny change: 'such that maximum **Bitwise' -> 'such that **Bitwise'
en1 Английский elements 2020-04-17 17:55:08 384 Initial revision (published)