{"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\n\u003cscript\u003e\n window.katexOptions \u003d {\n disable: true\n };\n\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\n","sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003eYour favorite shop sells $$$n$$$ Kinder Surprise chocolate eggs. You know that exactly $$$s$$$ stickers and exactly $$$t$$$ toys are placed in $$$n$$$ eggs in total.\u003c/p\u003e\u003cp\u003eEach Kinder Surprise can be one of three types:\u003c/p\u003e\u003cul\u003e \u003cli\u003e it can contain a single sticker and \u003cspan class\u003d\"tex-font-style-bf\"\u003eno toy\u003c/span\u003e; \u003c/li\u003e\u003cli\u003e it can contain a single toy and \u003cspan class\u003d\"tex-font-style-bf\"\u003eno sticker\u003c/span\u003e; \u003c/li\u003e\u003cli\u003e it can contain both a single sticker \u003cspan class\u003d\"tex-font-style-bf\"\u003eand\u003c/span\u003e a single toy. \u003c/li\u003e\u003c/ul\u003e\u003cp\u003eBut you \u003cspan class\u003d\"tex-font-style-bf\"\u003edon\u0027t know\u003c/span\u003e which type a particular Kinder Surprise has. All eggs look identical and indistinguishable from each other.\u003c/p\u003e\u003cp\u003eWhat is the minimum number of Kinder Surprise Eggs you have to buy to be sure that, whichever types they are, you\u0027ll obtain at least one sticker and at least one toy?\u003c/p\u003e\u003cp\u003eNote that you do not open the eggs in the purchasing process, that is, you just buy some number of eggs. It\u0027s guaranteed that the answer always exists.\u003c/p\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003eThe first line contains the single integer $$$T$$$ ($$$1 \\le T \\le 100$$$) — the number of queries.\u003c/p\u003e\u003cp\u003eNext $$$T$$$ lines contain three integers $$$n$$$, $$$s$$$ and $$$t$$$ each ($$$1 \\le n \\le 10^9$$$, $$$1 \\le s, t \\le n$$$, $$$s + t \\ge n$$$) — the number of eggs, stickers and toys.\u003c/p\u003e\u003cp\u003eAll queries are independent.\u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003ePrint $$$T$$$ integers (one number per query) — the minimum number of Kinder Surprise Eggs you have to buy to be sure that, whichever types they are, you\u0027ll obtain at least one sticker and one toy\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\u003e3\n10 5 7\n10 10 10\n2 1 1\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e6\n1\n2\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\u003eIn the first query, we have to take at least $$$6$$$ eggs because there are $$$5$$$ eggs with \u003cspan class\u003d\"tex-font-style-it\"\u003eonly toy\u003c/span\u003e inside and, in the worst case, we\u0027ll buy all of them.\u003c/p\u003e\u003cp\u003eIn the second query, all eggs have both a sticker and a toy inside, that\u0027s why it\u0027s enough to buy only one egg.\u003c/p\u003e\u003cp\u003eIn the third query, we have to buy both eggs: one with a sticker and one with a toy.\u003c/p\u003e"}}]}