Please subscribe to the official Codeforces channel in Telegram via the link https://t.me/codeforces_official. ×

Can this bitwise OR problem be solved ?

Revision en1, by LovesProgramming, 2020-03-16 11:51:28

Problem : — Given an array ,find the size of the smallest subset with maximum Bitwise OR .

Constraints : — 1<=N<=100000 ; 1<=A[I]<=1000000000

I found an article which solves this problem : https://www.geeksforgeeks.org/size-of-the-smallest-subset-with-maximum-bitwise-or/

But this solution[greedy] fails on the test-case : {56,33,7}

So is there any real solution for this problem ?

Tags #bitwise, #bitwiseor

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English LovesProgramming 2020-03-16 11:51:28 449 Initial revision (published)