{"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":"MD","content":"马学长对大一新生提出了一个问题:\n给你一个只包含大写字母的字符串s.\n请问这个字符串中是否包含两个没有重叠部分的子串\"AB\"和\"BA\".\n子串指连续的字符串,例如\"AB\"是“CABD\"的子串,”AB“不是\"ACDB\"的子串\n看着马学长严厉的面庞,同学们都很害怕,你能帮同学们度过难关吗?"}},{"title":"输入格式","value":{"format":"MD","content":"输入只有一个只包含大写字母的字符串s.\ns的长度\u003c\u003d10^5."}},{"title":"输出格式","value":{"format":"MD","content":"如果存在则输出YES,否则输出NO。"}},{"title":"样例输入1","value":{"format":"MD","content":"ABBA"}},{"title":"样例输出1","value":{"format":"MD","content":"YES"}},{"title":"样例输入2","value":{"format":"MD","content":"ABA"}},{"title":"样例输出2","value":{"format":"MD","content":"NO"}}]}