{"trustable":false,"prependHtml":"\u003cstyle type\u003d\u0027text/css\u0027\u003e\n .input, .output {\n border: 1px solid #888888;\n }\n .output {\n margin-bottom: 1em;\n position: relative;\n top: -1px;\n }\n .output pre, .input pre {\n background-color: #EFEFEF;\n line-height: 1.25em;\n margin: 0;\n padding: 0.25em;\n }\n \u003c/style\u003e\n \u003clink rel\u003d\"stylesheet\" href\u003d\"//codeforces.org/s/96598/css/problem-statement.css\" type\u003d\"text/css\" /\u003e\u003cscript\u003e window.katexOptions \u003d { disable: true }; \u003c/script\u003e\n\u003cscript type\u003d\"text/x-mathjax-config\"\u003e\n MathJax.Hub.Config({\n tex2jax: {\n inlineMath: [[\u0027$$$\u0027,\u0027$$$\u0027], [\u0027$\u0027,\u0027$\u0027]],\n displayMath: [[\u0027$$$$$$\u0027,\u0027$$$$$$\u0027], [\u0027$$\u0027,\u0027$$\u0027]]\n }\n });\n\u003c/script\u003e\n\u003cscript type\u003d\"text/javascript\" async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS_HTML-full\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003eAfter playing Neo in the legendary \"\u003cspan class\u003d\"tex-font-style-tt\"\u003eMatrix\u003c/span\u003e\" trilogy, Keanu Reeves started doubting himself: maybe we really live in virtual reality? To find if this is true, he needs to solve the following problem.\u003c/p\u003e\u003cp\u003eLet\u0027s call a string consisting of only zeroes and ones \u003cspan class\u003d\"tex-font-style-bf\"\u003egood\u003c/span\u003e if it contains \u003cspan class\u003d\"tex-font-style-bf\"\u003edifferent\u003c/span\u003e numbers of zeroes and ones. For example, \u003cspan class\u003d\"tex-font-style-tt\"\u003e1\u003c/span\u003e, \u003cspan class\u003d\"tex-font-style-tt\"\u003e101\u003c/span\u003e, \u003cspan class\u003d\"tex-font-style-tt\"\u003e0000\u003c/span\u003e are good, while \u003cspan class\u003d\"tex-font-style-tt\"\u003e01\u003c/span\u003e, \u003cspan class\u003d\"tex-font-style-tt\"\u003e1001\u003c/span\u003e, and \u003cspan class\u003d\"tex-font-style-tt\"\u003e111000\u003c/span\u003e are not good.\u003c/p\u003e\u003cp\u003eWe are given a string $$$s$$$ of length $$$n$$$ consisting of only zeroes and ones. We need to cut $$$s$$$ into \u003cspan class\u003d\"tex-font-style-bf\"\u003eminimal possible\u003c/span\u003e number of substrings $$$s_1, s_2, \\ldots, s_k$$$ such that \u003cspan class\u003d\"tex-font-style-bf\"\u003eall\u003c/span\u003e of them are good. More formally, we have to find \u003cspan class\u003d\"tex-font-style-bf\"\u003eminimal\u003c/span\u003e by number of strings sequence of good strings $$$s_1, s_2, \\ldots, s_k$$$ such that their concatenation (joining) equals $$$s$$$, i.e. $$$s_1 + s_2 + \\dots + s_k \u003d s$$$.\u003c/p\u003e\u003cp\u003eFor example, cuttings \u003cspan class\u003d\"tex-font-style-tt\"\u003e110010\u003c/span\u003e into \u003cspan class\u003d\"tex-font-style-tt\"\u003e110\u003c/span\u003e and \u003cspan class\u003d\"tex-font-style-tt\"\u003e010\u003c/span\u003e or into \u003cspan class\u003d\"tex-font-style-tt\"\u003e11\u003c/span\u003e and \u003cspan class\u003d\"tex-font-style-tt\"\u003e0010\u003c/span\u003e are valid, as \u003cspan class\u003d\"tex-font-style-tt\"\u003e110\u003c/span\u003e, \u003cspan class\u003d\"tex-font-style-tt\"\u003e010\u003c/span\u003e, \u003cspan class\u003d\"tex-font-style-tt\"\u003e11\u003c/span\u003e, \u003cspan class\u003d\"tex-font-style-tt\"\u003e0010\u003c/span\u003e are all good, and we can\u0027t cut \u003cspan class\u003d\"tex-font-style-tt\"\u003e110010\u003c/span\u003e to the smaller number of substrings as \u003cspan class\u003d\"tex-font-style-tt\"\u003e110010\u003c/span\u003e isn\u0027t good itself. At the same time, cutting of \u003cspan class\u003d\"tex-font-style-tt\"\u003e110010\u003c/span\u003e into \u003cspan class\u003d\"tex-font-style-tt\"\u003e1100\u003c/span\u003e and \u003cspan class\u003d\"tex-font-style-tt\"\u003e10\u003c/span\u003e isn\u0027t valid as both strings aren\u0027t good. Also, cutting of \u003cspan class\u003d\"tex-font-style-tt\"\u003e110010\u003c/span\u003e into \u003cspan class\u003d\"tex-font-style-tt\"\u003e1\u003c/span\u003e, \u003cspan class\u003d\"tex-font-style-tt\"\u003e1\u003c/span\u003e, \u003cspan class\u003d\"tex-font-style-tt\"\u003e0010\u003c/span\u003e isn\u0027t valid, as it isn\u0027t minimal, even though all $$$3$$$ strings are good.\u003c/p\u003e\u003cp\u003eCan you help Keanu? We can show that the solution always exists. If there are multiple optimal answers, print any.\u003c/p\u003e\n在传奇的《黑客帝国》三部曲中扮演尼奥之后,基努-里维斯开始怀疑自己:也许我们真的生活在虚拟现实中?为了弄清这是否属实,他需要解决以下问题。\n\u003c/p\u003e\n如果一个只由 0 和 1 组成的字符串包含了不同的 0 和 1,那么我们就把这个字符串称为好。例如,1、101、0000 是好字符串,而 01、1001 和 111000 则不是好字符串。\n\u003c/p\u003e\n给我们一个长度为 $n$ 的字符串 $s$ ,其中只有 0 和 1。我们需要将 $s$ 切割成少可能个子串 $s_1, s_2, \\ldots, s_k$ ,使得***个子串都是好的。更正式地说,我们需要找到**最小**的字符串序列 $s_1, s_2, \\ldots, s_k$ ,使得它们的连接(合并)等于 $s$ ,即 $s_1 + s_2 + \\dots + s_k \u003d s$ 。\u003c/p\u003e\n\n例如,将 110010 剪切成 110 和 010 或 11 和 0010 都是有效的,因为 110、010、11、0010 都是好字符串,我们不能将 110010 剪切成数量更少的子串,因为 110010 本身就不是好字符串。同时,将 110010 剪切成 1100 和 10 也是无效的,因为这两个字符串都不好。同样,将 110010 切分为 1, 1, 0010 也是无效的,因为它不是最小值,尽管所有的 $3$ 字符串都是好的。\n\u003c/p\u003e\n你能帮帮基努吗?我们可以证明解总是存在的。如果有多个最优答案,请打印任意一个。"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003eThe first line of the input contains a single integer $$$n$$$ ($$$1\\le n \\le 100$$$)\u0026nbsp;— the length of the string $$$s$$$.\u003c/p\u003e\u003cp\u003eThe second line contains the string $$$s$$$ of length $$$n$$$ consisting only from zeros and ones.\u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003eIn the first line, output a single integer $$$k$$$ ($$$1\\le k$$$)\u0026nbsp;— a \u003cspan class\u003d\"tex-font-style-bf\"\u003eminimal\u003c/span\u003e number of strings you have cut $$$s$$$ into.\u003c/p\u003e\u003cp\u003eIn the second line, output $$$k$$$ strings $$$s_1, s_2, \\ldots, s_k$$$ separated with spaces. The length of each string has to be positive. Their concatenation has to be equal to $$$s$$$ and all of them have to be good.\u003c/p\u003e\u003cp\u003eIf there are multiple answers, print any.\u003c/p\u003e"}},{"title":"Sample 1","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\u003e1\n1\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e1\n1\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"Sample 2","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\u003e2\n10\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e2\n1 0\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"Sample 3","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\u003e6\n100011\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e2\n100 011\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"Note","value":{"format":"HTML","content":"\u003cp\u003eIn the first example, the string \u003cspan class\u003d\"tex-font-style-tt\"\u003e1\u003c/span\u003e wasn\u0027t cut at all. As it is good, the condition is satisfied.\u003c/p\u003e\u003cp\u003eIn the second example, \u003cspan class\u003d\"tex-font-style-tt\"\u003e1\u003c/span\u003e and \u003cspan class\u003d\"tex-font-style-tt\"\u003e0\u003c/span\u003e both are good. As \u003cspan class\u003d\"tex-font-style-tt\"\u003e10\u003c/span\u003e isn\u0027t good, the answer is indeed minimal.\u003c/p\u003e\u003cp\u003eIn the third example, \u003cspan class\u003d\"tex-font-style-tt\"\u003e100\u003c/span\u003e and \u003cspan class\u003d\"tex-font-style-tt\"\u003e011\u003c/span\u003e both are good. As \u003cspan class\u003d\"tex-font-style-tt\"\u003e100011\u003c/span\u003e isn\u0027t good, the answer is indeed minimal.\u003c/p\u003e"}}]}