{"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":"MD","content":"SDUQD 旁边的滨海公园有 x 条长凳。第 i 个长凳上坐着 a_i 个人。这时候又有 y 个人将来到公园,他们将选择坐在某些公园中的长凳上,那么当这 y 个人坐下后,记k \u003d 所有椅子上的人数的最大值,那么k可能的最大值mx和最小值mn分别是多少。"}},{"title":"Input","value":{"format":"MD","content":"第一行包含一个整数 x (1 \u003c\u003d x \u003c\u003d 100) 表示公园中长椅的数目\n第二行包含一个整数 y (1 \u003c\u003d y \u003c\u003d 1000) 表示有 y 个人来到公园\n接下来 x 个整数 a_i (1\u003c\u003da_i\u003c\u003d100),表示初始时公园长椅上坐着的人数"}},{"title":"Output","value":{"format":"MD","content":"输出 mn 和 mx"}},{"title":"Input Example","value":{"format":"MD","content":"3\n7\n1\n6\n1"}},{"title":"Output Example","value":{"format":"MD","content":"6 13\n"}},{"title":"样例解释","value":{"format":"MD","content":"最初三张椅子的人数分别为 1 6 1\n接下来来了7个人。\n可能出现的情况为{1 6 8},{1,7,7},...,{8,6,1}\n相对应的k分别为8,7,...,8\n其中,状态{1,13,1}的k \u003d 13,为mx\n状态{4,6,5}和状态{5,6,4}的k \u003d 6,为mn"}}]}