Baltic BOI 2006 Bitwise

Revision en2, by minimario, 2017-06-30 21:39:01

Hi, I've been struggling with this problem recently: BOI06_BITWISE

If you're lazy, I'll summarise: We have an expression in the form (v1|v2|v3)&(v4|v5)&(v6), which is AND of OR operators. Each variable appears once, and there are at most 100 variables. We have a range for each variable (range is contained in [0, 2e9]). Calculate the maximum value of the expression.

I've only got obvious ideas: check if 1st bit can be 1, then if so, check if 2nd bit can be 1, etc. But it's nothing substantial.

So if anyone has some ideas, that would be great :^)

Thanks!

-minimario

Tags baltic boi 2006, bitwise, help, are you stupid

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English minimario 2017-06-30 21:39:01 0 (published)
en1 English minimario 2017-06-30 21:38:50 694 Initial revision (saved to drafts)