{"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":"ff 最近参加了一个比赛。这个比赛有 $n$ 位选手,分为两轮进行。\n\n对于每一位选手,如果第一轮排在第 $x$ 位,第二轮中排在第 $y$ 位,那么这位选手的总分是 $x+y$,其总排名是 总分小于等于他的总分的选手人数(包括自己)。\n\n注意,两轮中没有任何选手平局,但是可能有选手总分相同。\n\n现在 ff 知道他在第一轮是第 $x$ 名,第二轮中获得第 $y$ 名,ff 想知道他可能的最好和最坏的排名是多少。"}},{"title":"Input","value":{"format":"MD","content":"第一行有一个整数 $T(1 \\leqslant T \\leqslant 100$,表示有 $T$ 组样例。\n\n下面每一行都有三个整数 $n, x, y$,表示每一次比赛有 $n$ 位选手,两轮排名分别是 $x$ 和 $y$。且满足 $1 \\leqslant n \\leqslant 10^9$,$1 \\leqslant x, y \\leqslant n$。"}},{"title":"Output","value":{"format":"MD","content":"每一行输出两个整数,表示 ff 可能占据的最小排名和最大排名。"}},{"title":"Examples","value":{"format":"MD","content":"\u003cdiv class\u003d\"sample-test\"\u003e\n \u003cdiv class\u003d\"input\"\u003e\n \u003cdiv class\u003d\"title\"\u003e\n Input\n \u003c/div\u003e\n \u003cpre\u003e1\u003cbr\u003e5 1 3\u003cbr\u003e\u003c/pre\u003e\n \u003c/div\u003e\n \u003cdiv class\u003d\"output\"\u003e\n \u003cdiv class\u003d\"title\"\u003e\n Output\n \u003c/div\u003e\n \u003cpre\u003e1 3\u003cbr\u003e\u003c/pre\u003e\n \u003c/div\u003e\n \u003cdiv class\u003d\"input\"\u003e\n \u003cdiv class\u003d\"title\"\u003e\n Input\n \u003c/div\u003e\n \u003cpre\u003e1\u003cbr\u003e6 3 4\u003cbr\u003e\u003c/pre\u003e\n \u003c/div\u003e\n \u003cdiv class\u003d\"output\"\u003e\n \u003cdiv class\u003d\"title\"\u003e\n Output\n \u003c/div\u003e\n \u003cpre\u003e2 6\u003cbr\u003e\u003c/pre\u003e\n \u003c/div\u003e\n\u003c/div\u003e"}},{"title":"Note","value":{"format":"MD","content":"\u003cp\u003e第一个例子的解释:\u003c/p\u003e\n\u003cp\u003e假设有 5 名选手 A-E。我们将 ff 称为 A。ff 最有利的结果如下:\u003c/p\u003e\n\u003ccenter\u003e \n \u003cimg class\u003d\"tex-graphics\" SRC\u003d\"CDN_BASE_URL/ae62d8806cacd0bc46b78472cc34ac6a?v\u003d1582457647\" style\u003d\"max-width: 100.0%;max-height: 100.0%;\"\u003e \n\u003c/center\u003e\n\u003cp\u003e然而,比赛的结果也可能是这样的:\u003c/p\u003e\n\u003ccenter\u003e \n \u003cimg class\u003d\"tex-graphics\" SRC\u003d\"CDN_BASE_URL/b1922cc48799fd4d193b4eec3aefbadd?v\u003d1582457647\" style\u003d\"max-width: 100.0%;max-height: 100.0%;\"\u003e \n\u003c/center\u003e\n\u003cp\u003e在第一种情况下,ff 会获得第一,第二,第三的位置。\u003c/p\u003e"}}]}