{"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\n\u003cscript\u003e\n window.katexOptions \u003d {\n delimiters: [\n {left: \u0027$$$$$$\u0027, right: \u0027$$$$$$\u0027, display: true},\n {left: \u0027$$$\u0027, right: \u0027$$$\u0027, display: false},\n {left: \u0027$$\u0027, right: \u0027$$\u0027, display: true},\n {left: \u0027$\u0027, right: \u0027$\u0027, display: false}\n ]\n };\n\u003c/script\u003e\n","sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003eThere are $$$n$$$ trees along the road where Hinata lives, each one is trimmed in one of $$$k$$$ possible sizes.\u003c/p\u003e\n\u003cp\u003eHinata likes walking along this road, but she doesn\u0027t like when two adjacent trees at the road have the same size. She wants to select a long segment of the road such that no two adjacent trees have the same size.\u003c/p\u003e\n\u003cp\u003eHelp Hinata find the longest segment with this property.\u003c/p\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003eThe first line contains two integers $$$n$$$ and $$$k$$$\u0026nbsp;— the number of trees and the number of sizes ($$$1 \\le n \\le 100\\,000$$$, $$$1 \\le k \\le 100\\,000$$$).\u003c/p\u003e\n\u003cp\u003eThe next line contains $$$n$$$ integers $$$a_1, a_2, \\ldots, a_n$$$\u0026nbsp;— the sizes of the trees along the road ($$$1 \\le a_i \\le k$$$).\u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003eOutput a single integer\u0026nbsp;— the maximum number of trees on the road segment having no two adjacent trees of the same size.\u003c/p\u003e"}},{"title":"Example","value":{"format":"HTML","content":"\u003cdiv class\u003d\"sample-test\"\u003e\n \u003cdiv class\u003d\"input\"\u003e\n \u003cdiv class\u003d\"title\"\u003e\n Input\n \u003c/div\u003e\n \u003cpre\u003e8 3\n1 2 3 3 2 1 2 2\n\u003c/pre\u003e\n \u003c/div\u003e\n \u003cdiv class\u003d\"output\"\u003e\n \u003cdiv class\u003d\"title\"\u003e\n Output\n \u003c/div\u003e\n \u003cpre\u003e4\n\u003c/pre\u003e\n \u003c/div\u003e\n\u003c/div\u003e"}},{"title":"Note","value":{"format":"HTML","content":"\u003cp\u003eIn the example, the longest segment without neighboring trees of the same size is from the tree 4 to the tree 7. The sizes of the trees are $$$[3, 2, 1, 2]$$$ and its length is 4 trees.\u003c/p\u003e"}}]}