Problem 4053 · Medium

Minimum Operations to Make Every Element Palindromic

Each step moves a value by two, so its parity is fixed. Each value picks the nearest palindrome of its own parity on either side.

Open the interactive visualisation