内存限制:512 MB
时间限制:2 S
题面:Markdown
评测方式:文本比较
上传者:
提交:16
通过:5
**Red** is on a $2\cdot n$ grid, with some cells being red and others being white.
**Red** can initially choose a red cell, and at each step, can choose a red cell above, below, to the left, or to the right. When **Red** leaves a cell, the cell immediately turns white.
**Red** wants to know the maximum number of steps she can take.
If there are no initial red cells, please output $0$.
An integer — the maximum number of steps **Red** can take.