{"trustable":false,"sections":[{"title":"","value":{"format":"HTML","content":"奶牛有一排 20 个水碗供它们饮用。 碗可以正面朝上(正确放置以提供清爽的凉水)或倒置(不盛水的位置)。 他们希望所有 20 个水碗都是正面朝上的,因此用他们宽大的鼻子来翻转碗。\n\u003cbr\u003e\n\u003cbr\u003e然而,它们的鼻子非常宽,以至于它们不仅会翻转一个碗,还会翻转该碗两侧的碗(总共三个或 - 在任一端碗的情况下 - 两个碗)。\n\u003cbr\u003e\n\u003cbr\u003e给定碗的初始状态(1 \u003d 不可饮用,0 \u003d 可饮用——它甚至看起来像一个碗),将所有碗正面朝上翻转所需的最小碗翻转次数是多少?"}},{"title":"Input","value":{"format":"HTML","content":"第 1 行:包含 20 个空格分隔的整数的单行"}},{"title":"Output","value":{"format":"HTML","content":"第 1 行:将所有碗正面朝上翻转所需的最小碗翻转次数(即,翻转为 0)。 对于给定的输入,总是有可能找到一些翻转组合,将碗操纵到 20 个 0。"}},{"title":"Sample","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e0 0 1 1 1 0 0 1 1 0 1 1 0 0 0 0 0 0 0 0\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e3\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"Hint","value":{"format":"HTML","content":"Explanation of the sample:\n\u003cbr\u003e\n\u003cbr\u003eFlip bowls 4, 9, and 11 to make them all drinkable:\n\u003cbr\u003e0 0 1 1 1 0 0 1 1 0 1 1 0 0 0 0 0 0 0 0 [initial state]\n\u003cbr\u003e0 0 0 0 0 0 0 1 1 0 1 1 0 0 0 0 0 0 0 0 [after flipping bowl 4]\n\u003cbr\u003e0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 [after flipping bowl 9]\n\u003cbr\u003e0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 [after flipping bowl 11]"}}]}