Palindrome Game (hard version)
HardRating 1900CodeforcesMixed Practice
Approach hintTry it first, then revealHide
Settle the palindromic case first by playing small examples and counting zeros. For a non-palindrome, the first player can use reversals to shift costs onto the opponent; look for the single tiny configuration where this advantage vanishes.