Problem 2172 · Hard

Maximum AND Sum of Array

Place numbers into slots that each hold two numbers, maximising the sum of each number's AND with its slot index. The visual shows the slots as pairs and tracks the best assignment by bitmask.

Open the interactive visualisation