{"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":"\u003cstyle type\u003d\u0027text/css\u0027\u003e .input, .output {border: 1px solid #888888;} .output {margin-bottom:1em;position:relative;top:-1px;} .output pre,.input pre {background-color:#EFEFEF;line-height:1.25em;margin:0;padding:0.25em;} .title {background-color:#FFFFFF;border-bottom: 1px solid #888888;font-family:arial;font-weight:bold;padding:0.25em;} \u003c/style\u003e \u003cscript type\u003d\"text/x-mathjax-config\"\u003e\n MathJax.Hub.Config({\n tex2jax: {inlineMath: [[\u0027$$$\u0027,\u0027$$$\u0027]], displayMath: [[\u0027$$$$$$\u0027,\u0027$$$$$$\u0027]]}\n });\n \u003c/script\u003e\n \u003cscript type\u003d\"text/javascript\" async\n src\u003d\"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config\u003dTeX-AMS-MML_HTMLorMML\"\u003e\n \u003c/script\u003e\n\u003cp\u003eতোমাকে দুটি ধনাত্মক পূর্ণসংখ্যা দেওয়া হবে a ও b । \u003c/p\u003e\n\n\u003cp\u003eএকটি ধাপে, তুমি একটি পরিবর্তন করতে পারবে নিম্নলিখিত উপায়ে:\u003c/p\u003e\n\n\u003cp\u003e-\u003e কোনও ধনাত্মক বিজোড় পূর্ণসংখ্যার x বেছে নাও (x\u003e 0) এবং a কে প্রতিস্থাপন করো a+x দিয়ে \u003c/p\u003e\n\n\u003cp\u003e-\u003e কোনও ধনাত্মক জোড় পূর্ণসংখ্যার y বেছে নাও (y\u003e 0) এবং a কে প্রতিস্থাপন করো a-y দিয়ে \u003c/p\u003e\n\n\u003cp\u003eতুমি যত খুশি ততবার এই পরিবর্তন করতে পারবে । তুমি বিভিন্ন স্টেপ এ একই x ও y সংখ্যা নির্বাচন করতে পারবে । \u003c/p\u003e\n\n\u003cp\u003eএখন তোমাকে একটি কোড লিখতে হবে যেটি a কে b তে পরিবর্তন করতে ন্যূনতম কয়টি ধাপ প্রয়োজন সেটি প্রদর্শন করবে । এটি গ্যারান্টিযুক্ত যে তুমি সর্বদা a কে b তে পরিবর্তন করতে পারবে । \u003c/p\u003e\n"}},{"title":"","value":{"format":"HTML","content":"\u003cp\u003eYou are given two positive integers \u003cb\u003ea\u003c/b\u003e and \u003cb\u003eb\u003c/b\u003e.\u003c/p\u003e\n\n\u003cp\u003eIn one move, you can do one of the following: you can select any positive odd integer \u003cb\u003ex\u003c/b\u003e and add \u003cb\u003ex\u003c/b\u003e to \u003cb\u003ea\u003c/b\u003e, or you can select any positive even integer \u003cb\u003ey\u003c/b\u003e and subtract \u003cb\u003ey\u003c/b\u003e from \u003cb\u003ea\u003c/b\u003e.\u003c/p\u003e\n\nYou can make such a move however many times you want. Find the minimum number of moves required to get \u003cb\u003eb\u003c/b\u003e from \u003cb\u003ea\u003c/b\u003e.\n\nAlso, there are \u003cb\u003et\u003c/b\u003e test cases."}},{"title":"Input","value":{"format":"HTML","content":"The first line has integer \u003cb\u003et\u003c/b\u003e (1 \u003c\u003d t \u003c\u003d 10^4) - the number of test cases. Each test case contains two integer numbers \u003cb\u003ea\u003c/b\u003e and \u003cb\u003eb\u003c/b\u003e (1 \u003c\u003d a, b \u003c\u003d 10^9)."}},{"title":"Output","value":{"format":"HTML","content":"For 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."}},{"title":"Example","value":{"format":"HTML","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\u003e5\n2 3\n10 10\n2 4\n7 4\n9 3\n\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\n0\n2\n2\n1\n\u003c/pre\u003e\n \u003c/div\u003e\n\u003c/div\u003e"}},{"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"}}]}