Problem 4059 · Hard

Lexicographically Largest Power Array

Place elements one at a time, always taking the one that keeps the most still-unbroken bits set, so each bit run lasts as long as it can.

Open the interactive visualisation