{"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":"HTML","content":"\u003cp\u003eYou are given two positive integers $$$a$$$ and $$$b$$$.\u003c/p\u003e\n\u003cp\u003eIn one move, you can \u003cspan class\u003d\"tex-font-style-bf\"\u003echange\u003c/span\u003e $$$a$$$ in the following way:\u003c/p\u003e\n\u003cul\u003e \n \u003cli\u003e Choose any positive \u003cspan class\u003d\"tex-font-style-bf\"\u003eodd\u003c/span\u003e integer $$$x$$$ ($$$x \u0026gt; 0$$$) and replace $$$a$$$ with $$$a+x$$$; \u003c/li\u003e\n \u003cli\u003e choose any positive \u003cspan class\u003d\"tex-font-style-bf\"\u003eeven\u003c/span\u003e integer $$$y$$$ ($$$y \u0026gt; 0$$$) and replace $$$a$$$ with $$$a-y$$$. \u003c/li\u003e\n\u003c/ul\u003e\n\u003cp\u003eYou can perform as many such operations as you want. You can choose the same numbers $$$x$$$ and $$$y$$$ in different moves.\u003c/p\u003e\n\u003cp\u003eYour task is to find the minimum number of moves required to obtain $$$b$$$ from $$$a$$$. It is guaranteed that you can always obtain $$$b$$$ from $$$a$$$.\u003c/p\u003e\n\u003cp\u003eYou have to answer $$$t$$$ independent test cases.\u003c/p\u003e\n\u003chr/\u003e\n\u003cp\u003e每次操作你可以让 $a$ 加上任意正奇数,也可以让 $a$ 减去任意正偶数,问将 $a$ 变成 $b$ 的最少操作数。\u003c/p\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003eThe first line of the input contains one integer $$$t$$$ ($$$1 \\le t \\le 10^4$$$) — the number of test cases.\u003c/p\u003e\n\u003cp\u003eThen $$$t$$$ test cases follow. Each test case is given as two space-separated integers $$$a$$$ and $$$b$$$ ($$$1 \\le a, b \\le 10^9$$$).\u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003eFor each test case, print the answer — the minimum number of moves required to obtain $$$b$$$ from $$$a$$$ if you can perform any number of moves described in the problem statement. It is guaranteed that you can always obtain $$$b$$$ from $$$a$$$.\u003c/p\u003e"}},{"title":"Sample 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\u003e5\n2 3\n10 10\n2 4\n7 4\n9 3\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e1\n0\n2\n2\n1\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 test case, you can just add $$$1$$$.\u003c/p\u003e\n\u003cp\u003eIn the second test case, you don\u0027t need to do anything.\u003c/p\u003e\n\u003cp\u003eIn the third test case, you can add $$$1$$$ two times.\u003c/p\u003e\n\u003cp\u003eIn the fourth test case, you can subtract $$$4$$$ and add $$$1$$$.\u003c/p\u003e\n\u003cp\u003eIn the fifth test case, you can just subtract $$$6$$$.\u003c/p\u003e"}}]}