{"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":"小A有一个长度为 n 的正整数数列 a\u003csub\u003e1\u003c/sub\u003e,a\u003csub\u003e2\u003c/sub\u003e,…,a\u003csub\u003en\u003c/sub\u003e 和整数 k ,请你输出一个正整数 x∈[1,10\u003csup\u003e9\u003c/sup\u003e] ,使得数列中恰有 k 个数小于等于 x 。"}},{"title":"【输入格式】","value":{"format":"MD","content":"输入格式如下:\nn k\na\u003csub\u003e1\u003c/sub\u003e a\u003csub\u003e2\u003c/sub\u003e … a\u003csub\u003en\u003c/sub\u003e"}},{"title":"【输出格式】","value":{"format":"MD","content":"如果存在题面所述的正整数 x ,输出之。\n否则,请输出 -1 。"}},{"title":"【样例输入/输出】","value":{"format":"MD","content":"Input\n7 4\n3 7 5 1 10 3 20\nOutput\n6\nInput\n7 2\n3 7 5 1 10 3 20\nOutput\n-1"}},{"title":"【样例解释】","value":{"format":"MD","content":"【样例1】\n5,6 均是合法的解,因为 1,3,3,5 ≤ 5,6\n【样例2】\n你可以尝试代入[1,10\u003csup\u003e9\u003c/sup\u003e]中的所有整数,然后发现不存在所述的 x 。"}},{"title":"【数据范围】","value":{"format":"MD","content":"对于所有测试数据:\n1 ≤ n ≤ 2×10\u003csup\u003e5\u003c/sup\u003e\n0 ≤ k ≤ n\n1 ≤ a\u003csub\u003ei\u003c/sub\u003e ≤ 10\u003csup\u003e9\u003c/sup\u003e"}}]}