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
is there a link for the problem?
No I reduced some other problem to this and couldn't find solution to this task.
This problem is the OV problem with $$$\log$$$ bits, it cannot be solved better than $$$\mathcal O(nv)$$$.
I get it that the time complexity should $$$O(nv)$$$, but I need the solution can you please post if you get one!
I am not sure this solution is right, so do not blame me if I wrong(XD.
Due to I do not know link to test, I can only give you this $$$O(v^2)$$$ solution of DP
Yeah, it is right, I have a friend created this problem before, I test it and get ac.
share the link of this problem
It is a Chinese problem,here is link:https://ac.nowcoder.com/acm/problem/270788