{"raw_statement":[{"iden":"statement","content":"Assem bought a new chess board that has a special king that move in a different way than other regular kings. \n\nIn one move, the special king can move from its position in one of the following directions: up, down, left, or right. Formally, if the special king is standing on position ($x$, $y$), in one move it can go to one of the following positions: ($x -1$, $y$), ($x + 1$, $y$), ($x$, $y -1$), or ($x$, $y + 1$).\n\nInitially, the special king is standing on position ($x_1$, $y_1$) and Assem wants to place it on position ($x_2$, $y_2$). Can you help Assem by calculating the minimum number of required moves he needs to accomplish his goal?\n\nThe first line contains an integer $T$ ($1 <= T <= 4096$) specifying the number of test cases,\n\nEach test consists of a single line containing four integers $x_1$, $y_1$, $x_2$, and $y_2$ ($1 <= x_1, y_1, x_2, y_2 <= 8$), in which $x_1$ and $y_1$ are representing the starting position of the special king, and $x_2$ and $y_2$ are representing the the ending position.\n\nFor each test case, print a single line containing the minimum number of required moves to move the special king from the starting position to the ending position.\n\nIn the first test case, the special king needs to be moved from position ($1$, $3$) to ($4$, $2$). One possible solution is to make $3$ moves down to position ($4$, $3$), then make $1$ move to the left to position ($4$, $2$). So, the total number of moves is $4$.\n\n"},{"iden":"input","content":"The first line contains an integer $T$ ($1 <= T <= 4096$) specifying the number of test cases,Each test consists of a single line containing four integers $x_1$, $y_1$, $x_2$, and $y_2$ ($1 <= x_1, y_1, x_2, y_2 <= 8$), in which $x_1$ and $y_1$ are representing the starting position of the special king, and $x_2$ and $y_2$ are representing the the ending position."},{"iden":"output","content":"For each test case, print a single line containing the minimum number of required moves to move the special king from the starting position to the ending position."},{"iden":"note","content":"In the first test case, the special king needs to be moved from position ($1$, $3$) to ($4$, $2$). One possible solution is to make $3$ moves down to position ($4$, $3$), then make $1$ move to the left to position ($4$, $2$). So, the total number of moves is $4$."}],"translated_statement":null,"sample_group":[],"show_order":[],"formal_statement":"**Definitions**  \nLet $ T \\in \\mathbb{Z} $ be the number of test cases.  \nFor each test case $ k \\in \\{1, \\dots, T\\} $, let $ (x_{1,k}, y_{1,k}) $ be the starting position and $ (x_{2,k}, y_{2,k}) $ be the target position.\n\n**Constraints**  \n1. $ 1 \\le T \\le 4096 $  \n2. For each $ k \\in \\{1, \\dots, T\\} $:  \n   $ 1 \\le x_{1,k}, y_{1,k}, x_{2,k}, y_{2,k} \\le 8 $\n\n**Objective**  \nFor each test case $ k $, compute the minimum number of moves required for the king to move from $ (x_{1,k}, y_{1,k}) $ to $ (x_{2,k}, y_{2,k}) $ using only unit steps in the four cardinal directions:  \n$$\n\\text{min moves}_k = |x_{2,k} - x_{1,k}| + |y_{2,k} - y_{1,k}|\n$$","simple_statement":"Calculate the minimum moves for a king to go from (x1, y1) to (x2, y2) using only up, down, left, or right moves.","has_page_source":false}