Problem 3766 · Medium

Minimum Operations to Make Binary Palindrome

Each element may move up or down by one per operation. For every element, find the nearest positive integer whose binary form reads the same both ways.

Open the interactive visualisation