Approach hintTry it first, then revealHide
Keep two states per string: the minimum cost so far if it stays as it is and if it is reversed. Each state may follow either state of the previous string when the order is non-decreasing; costs need 64 bits.