6 1 1 1 1 1 0
3 To make the integers written in each cell $i$ equal to $A_i$, for example, you can perform the following operations. (Here, we represent the state of the grid as a sequence $X = (X_1, X_2, \dots, X_N)$.) * Initially, $X = (1, 0, 1, 0, 1, 0)$. * Choose cells $2$ and $4$. $X$ becomes $(1, 0, 0, 0, 1, 0)$. * Choose cells $1$ and $5$. $X$ becomes $(1, 1, 1, 1, 1, 0)$. Besides the above, there are two other sequences of operations that result in the integers written in cell $i$ being $A_i$, so the answer is $3$.
10 1 1 1 1 1 0 1 1 1 0
9
{
"problem": {
"name": "Reversi 2",
"description": {
"content": "There is a grid consisting of $N$ cells numbered $1$ to $N$. Initially, cell $i$ $(1 \\le i \\le N)$ has an integer $i \\bmod 2$ written in it. You can perform the following operation any number of times",
"description_type": "Markdown"
},
"platform": "AtCoder",
"limit": {
"time_limit": 2000,
"memory_limit": 262144
},
"difficulty": "None",
"is_remote": true,
"is_sync": true,
"sync_url": null,
"sign": "arc189_a"
},
"statements": [
{
"statement_type": "Markdown",
"content": "There is a grid consisting of $N$ cells numbered $1$ to $N$.\nInitially, cell $i$ $(1 \\le i \\le N)$ has an integer $i \\bmod 2$ written in it. You can perform the following operation any number of times...",
"is_translate": false,
"language": "English"
}
]
}