{"raw_statement":[{"iden":"problem statement","content":"You are given two sequences: $A=(A_1,A_2, \\ldots ,A_N)$ consisting of $N$ positive integers, and $B=(B_1, \\ldots ,B_M)$ consisting of $M$ positive integers.\nFind the minimum difference of an element of $A$ and an element of $B$, that is, $\\displaystyle \\min_{ 1\\leq i\\leq N}\\displaystyle\\min_{1\\leq j\\leq M} \\lvert A_i-B_j\\rvert$."},{"iden":"constraints","content":"*   $1 \\leq N,M \\leq 2\\times 10^5$\n*   $1 \\leq A_i \\leq 10^9$\n*   $1 \\leq B_i \\leq 10^9$\n*   All values in input are integers."},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$N$ $M$\n$A_1$ $A_2$ $\\ldots$ $A_N$\n$B_1$ $B_2$ $\\ldots$ $B_M$"},{"iden":"sample input 1","content":"2 2\n1 6\n4 9"},{"iden":"sample output 1","content":"2\n\nHere is the difference for each of the four pair of an element of $A$ and an element of $B$: $\\lvert 1-4\\rvert=3$, $\\lvert 1-9\\rvert=8$, $\\lvert 6-4\\rvert=2$, and $\\lvert 6-9\\rvert=3$. We should print the minimum of these values, or $2$."},{"iden":"sample input 2","content":"1 1\n10\n10"},{"iden":"sample output 2","content":"0"},{"iden":"sample input 3","content":"6 8\n82 76 82 82 71 70\n17 39 67 2 45 35 22 24"},{"iden":"sample output 3","content":"3"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}