CF1040A Palindrome Dance

题目描述

### 题目大意 给你一个序列,里面的元素只能是 $0,1$ 或 $2$,$2$ 可以通过代价换成 $1$ 或者 $0$,问形成**仅包含 $0,1$** 的回文串的最小代价。

输入格式

输出格式

说明/提示

In the first sample, the cheapest way to obtain palindromic colors is to buy a black suit for the third from left dancer and a white suit for the rightmost dancer. In the second sample, the leftmost dancer's suit already differs from the rightmost dancer's suit so there is no way to obtain the desired coloring. In the third sample, all suits are already bought and their colors form a palindrome.