{"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":"HTML","content":"对于一个只包含正整数的可重集 $S$,你需要支持以下 $2$ 种操作:\u003c/p\u003e\n\n1. 加入一个新数 $x$ 到 $S$ 中,满足加入的数是递增的;\u003c/p\u003e\n\n2. 找出 $S$ 的一个子集 $s$,使其 $\\max(s)-\\text{mean}(s)$ 最大。其中 $\\max(s)$ 表示 $s$ 中的最大值,$\\text{mean}(s)$ 表示 $s$ 中所有元素的平均值。输出这个最大值。"}},{"title":"Input","value":{"format":"HTML","content":"共有 $Q(1\\leq Q\\leq 5\\times 10^5)$ 次操作。每次操作先输入一个整数 $op$ 。\n\n\u003c/p\u003e如 $op\u003d1$ 则再输入整数 $x(1\\leq x \\leq 10^9)$ 表示第一种操作。\u003c/p\u003e\n\n如 $op\u003d2$ 则表示第二种操作。"}},{"title":"Output","value":{"format":"HTML","content":"对于每个第二种操作,输出一个浮点数表示答案。输出答案与标准答案满足 \u003cimg align\u003d\"middle\" class\u003d\"tex-formula\" src\u003d\"CDN_BASE_URL/a26039717458c3827f0287aeab94829c?v\u003d1658703766\" style\u003d\"max-width: 100.0%;max-height: 100.0%;\"\u003e 则视为正确。"}},{"title":"Sample 1","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e6\n1 3\n2\n1 4\n2\n1 8\n2\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e0.0000000000\n0.5000000000\n3.0000000000\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"Sample 2","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e4\n1 1\n1 4\n1 5\n2\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e2.0000000000\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}