Problem 2505 · Medium

Bitwise OR of All Subsequence Sums

Mark every total that subsets of the numbers can reach, then fold those totals together with bitwise OR.

Open the interactive visualisation