{"trustable":false,"sections":[{"title":"","value":{"format":"HTML","content":"你有一个点的集合,x1,x2,xn;二个点是匹配的满足1:i,j没有被匹配过,2:|xi-xj|\u003e\u003dz;给n个点最多有多少组匹配"}},{"title":"Input","value":{"format":"HTML","content":"\u003cpre class\u003d\"sio\"\u003e\nThe first line contains two integers n and z (2≤n≤2⋅10^5, 1≤z≤10^9) — the number of points and the constraint on the distance between matched points, respectively.\n\nThe second line contains n integers x1, x2, ..., xn (1≤xi≤10^9).\n\u003c/pre\u003e"}},{"title":"Output","value":{"format":"HTML","content":"Print one integer — the maximum number of pairs of points you can match with each other."}},{"title":"Examples","value":{"format":"HTML","content":"\u003cpre class\u003d\"sio\"\u003e\n4 2\n1 3 3 7\n2\n\n5 5\n10 9 5 8 7\n1\n\u003c/pre\u003e"}},{"title":"Note","value":{"format":"HTML","content":""}}]}