{"trustable":true,"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":"\u003cp\u003e恐怖分子在一栋建筑物中埋下了一些炸弹!我们的英雄小马决定营救建筑物中的人。不幸的是,不止一个炸弹,小马无法拆除所有的炸弹。为了争取更多时间让其他人逃生,小马决定牺牲自己。\u003c/p\u003e\u003cp\u003e建筑物中有$$$n$$$枚炸弹,每个炸弹都有一个倒计时时钟。一开始,第$$$i$$$枚炸弹的时钟设置为$$$a_i$$$。然后:\u003c/p\u003e\u003col\u003e \u003cli\u003e 小马选择一个炸弹,使其时钟增加$$$1$$$。 \u003c/li\u003e\u003cli\u003e 每个炸弹的时钟减少$$$1$$$。 \u003c/li\u003e\u003cli\u003e 如果至少有一个时钟变成小于$$$0$$$,所有炸弹将爆炸。否则,回到步骤1。 \u003c/li\u003e\u003c/ol\u003e\u003cp\u003e显然,爆炸是不可避免的。多么悲伤的故事。但小马现在不在乎自己的生存。他只想争取更多时间。所以你能告诉他在爆炸之前最多可以执行步骤1多少次吗?\u003c/p\u003e"}},{"title":"输入","value":{"format":"HTML","content":"\u003cp\u003e输入的第一行包含一个整数$$$T$$$($$$1 \\le T \\le 100$$$)— 测试用例的数量。\u003c/p\u003e\u003cp\u003e输入的第一行包含一个整数$$$n$$$($$$2 \\le n \\le 10^5$$$)— 炸弹的数量。所有$$$n$$$的总和不会超过$$$3\\times10^5$$$。\u003c/p\u003e\u003cp\u003e接下来一行包含$$$n$$$个数字$$$a_1,a_2,\\dots,a_n$$$($$$0 \\le a_1,a_2,\\dots,a_n \\le 10^9$$$)— 表示初始时炸弹的时钟数。\u003c/p\u003e"}},{"title":"输出","value":{"format":"HTML","content":"\u003cp\u003e对于第$$$x$$$个测试用例,如果答案是$$$y$$$,在一行中输出\u003cspan class\u003d\"tex-font-style-bf\"\u003e$$$Case$$$ #$$$x$$$: $$$y$$$\u003c/span\u003e。\u003c/p\u003e"}},{"title":"示例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\u003e2\n2\n1 1\n3\n1 2 3\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eCase #1: 3\nCase #2: 4\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e"}}]}