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