{"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\u003eA group of students has recently been admitted to the Faculty of Computer Sciences at the Berland State University. Now the programming teacher wants to divide them into three subgroups for practice sessions.\u003c/p\u003e\u003cp\u003eThe teacher knows that a lot of programmers argue which language is the best. The teacher doesn\u0027t want to hear any arguments in the subgroups, so she wants to divide the students into three subgroups so that no pair of students belonging to the same subgroup want to argue.\u003c/p\u003e\u003cp\u003eTo perform this division, the teacher asked each student which programming language he likes. There are $$$a$$$ students who answered that they enjoy Assembler, $$$b$$$ students stated that their favourite language is Basic, and $$$c$$$ remaining students claimed that C++ is the best programming language — and there was a large argument between Assembler fans and C++ fans.\u003c/p\u003e\u003cp\u003eNow, knowing that Assembler programmers and C++ programmers can start an argument every minute, the teacher wants to divide the students into three subgroups so that every student belongs to exactly one subgroup, and there is no subgroup that contains at least one Assembler fan and at least one C++ fan. Since teaching a lot of students can be difficult, the teacher wants the size of the largest subgroup to be minimum possible.\u003c/p\u003e\u003cp\u003ePlease help the teacher to calculate the minimum possible size of the largest subgroup!\u003c/p\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003eThe first line contains one integer $$$t$$$ ($$$1 \\le t \\le 5$$$) — the number of test cases in the input. Then test cases follow.\u003c/p\u003e\u003cp\u003eEach test case consists of one line containing three integers $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \\le a, b, c \\le 1000$$$) — the number of Assembler fans, Basic fans and C++ fans, respectively.\u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003eFor each test case print one integer — the minimum size of the largest subgroup if the students are divided in such a way that there is no subgroup that contains at least one Assembler fan and at least one C++ fan simultaneously.\u003c/p\u003e"}},{"title":"Examples","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\u003e5\n3 5 7\n4 8 4\n13 10 13\n1000 1000 1000\n13 22 7\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e5\n6\n13\n1000\n14\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"","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\u003e5\n1 3 4\n1000 1000 1\n4 1 2\n325 226 999\n939 861 505\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e3\n667\n3\n517\n769\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"Note","value":{"format":"HTML","content":"\u003cp\u003eExplanation of the answers for the example $$$1$$$:\u003c/p\u003e\u003col\u003e\u003cli\u003e The first subgroup contains $$$3$$$ Assembler fans and $$$2$$$ Basic fans, the second subgroup — $$$5$$$ C++ fans, the third subgroup — $$$2$$$ C++ fans and $$$3$$$ Basic fans. \u003c/li\u003e\u003cli\u003e The first subgroup contains $$$4$$$ Assembler fans, the second subgroup — $$$6$$$ Basic fans, the third subgroup — $$$2$$$ Basic fans and $$$4$$$ C++ fans. \u003c/li\u003e\u003cli\u003e The first subgroup contains all Assembler fans, the second subgroup — all Basic fans, the third subgroup — all C++ fans. \u003c/li\u003e\u003cli\u003e The first subgroup contains all Assembler fans, the second subgroup — all Basic fans, the third subgroup — all C++ fans. \u003c/li\u003e\u003cli\u003e The first subgroup contains $$$12$$$ Assembler fans and $$$2$$$ Basic fans, the second subgroup — $$$1$$$ Assembler fan and $$$13$$$ Basic fans, the third subgroup — $$$7$$$ Basic fans and $$$7$$$ C++ fans. \u003c/li\u003e\u003c/ol\u003e"}}]}