Imthiyash786's blog

By Imthiyash786, 17 months ago, In English

Given an array of n integers $$$a_1,a_2,...a_n$$$ output the minimum size of the subsequence $$$b = {b_1,b_2,..b_k}$$$ of array a such that the following condition holds

$$$b_1$$$ & $$$b_2$$$ & $$$b_3$$$ &.....& $$$b_k = 0$$$

constraints : 1 <= n <= 1e5, 1 <= $$$a_i$$$ <= 1e4

  • Vote: I like it
  • 0
  • Vote: I do not like it

| Write comment?
»
17 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

is there a link for the problem?

»
17 months ago, hide # |
 
Vote: I like it +6 Vote: I do not like it

This problem is the OV problem with $$$\log$$$ bits, it cannot be solved better than $$$\mathcal O(nv)$$$.