{"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":"在 CCPC 比赛中,如果你的程序运行时间过长,你会得到 \"Time Limit Exceeded\" 的结果。为问题设置合适的时间限制对于比赛至关重要。\n\n面包先生正在为即将到来的比赛准备问题,他和他的朋友们一起。对于每个问题,都会有一个 \"Main Correct Solution\" 表示作者编写的标准解决方案。还会有几个 \"Correct Solutions\" 表示预期通过的解决方案。\n\n假设总共有 $n$ 个程序,标记为 $1,2,\\dots,n$。第 $1$ 个程序表示 \"Main Correct Solution\",而其他的都是 \"Correct Solutions\"。第 $i$ 个程序在 $a_i$ 秒内运行。\n\n根据面包先生心中的规则,时间限制 $x$ 应满足以下所有规则:\n\n- 约束不能太紧,这意味着 $x\\geq 3a_1$。\n- 所有的 \"Correct Solutions\" 都应该通过,这意味着对于所有的 $[i\\in2,n]$,都有 $x\\geq a_i+1$。\n- $x$ 应该是满足上述规则的最小偶数。\n\n请编写一个程序来找到时间限制 $x$。"}},{"title":"输入格式","value":{"format":"MD","content":"输入的第一行包含一个整数 $T (1 \\leq T \\leq 10)$,表示测试案例的数量。\n\n在每个测试案例中,第一行有一个整数 $n (2 \\leq n \\leq 10)$,表示程序的数量。\n\n在第二行,有 $n$ 个整数 $a_1, a_2, ..., a_n (1 \\leq a_i \\leq 10)$。"}},{"title":"输出格式","value":{"format":"MD","content":"对于每个测试用例,打印一行包含一个整数,表示 $x$ 的值。"}},{"title":"样例 #1","value":{"format":"MD","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003e输入\u003c/th\u003e\n \u003cth\u003e输出\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e2\n2\n1 3\n2\n1 4\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e4\n6\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}