{"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":"注意此题的空间限制为28M。\n初始化你有一个装有一些糖果的袋子, 每个糖果有自己的甜度 sweet\n现在你有两种操作\n- remove K 找出袋子中甜度第K小的糖果, 并扔掉它(保证存在第K小)\n- insert K 给袋子中装入一个甜度为K的糖果\n\n例如装有甜度为3, 7, 2, 1, 8, 1 糖果的袋子, 第3小的糖果甜度为2\n现在有q次操作, 请你输出所有q次操作结束后, 最后袋子剩下的任意一个糖果的甜度\n如果袋子为空, 输出一行0\n答案可能存在多个, 输出任意一种\n"}},{"title":"Input","value":{"format":"MD","content":"第一行输入 1\u003c\u003d n, q \u003c\u003d 1e6 , 表示初始袋子中的糖果数和操作数\n第二行输入n个数字 1\u003c\u003d sweet_i \u003c\u003d n —— 袋子中初始的糖果 \n第三行输入q个数字K_i\n- 当K_i \u003c 0 代表remove操作 |K_i|\n- 当 1 \u003c\u003d K_i \u003c\u003d n 代表insert操作"}},{"title":"Output","value":{"format":"MD","content":"输出最后袋子剩下的任意一个糖果的甜度\n如果袋子为空, 输出一行0"}},{"title":"Examples","value":{"format":"MD","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\u003e5 5\n1 2 3 4 5\n-1 -1 -1 -1 -1\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\u003e0\n\u003c/pre\u003e\n \u003c/div\u003e\n \u003cdiv class\u003d\"input\"\u003e\n \u003cdiv class\u003d\"title\"\u003e\n Input\n \u003c/div\u003e\n \u003cpre\u003e5 4\n1 2 3 4 5\n-5 -1 -3 -1\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\u003e3\n\u003c/pre\u003e\n \u003c/div\u003e\n \u003cdiv class\u003d\"input\"\u003e\n \u003cdiv class\u003d\"title\"\u003e\n Input\n \u003c/div\u003e\n \u003cpre\u003e6 2\n1 1 1 2 3 4\n5 6\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\u003e6\n\u003c/pre\u003e\n \u003c/div\u003e\n\u003c/div\u003e"}}]}