Problem 2275 · Medium

Largest Combination With Bitwise AND Greater Than Zero

A combination has a nonzero AND exactly when all its numbers share one set bit, so count the numbers for each bit.

Open the interactive visualisation