{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003eXKC , the captain of the basketball team , is directing a train of $n$ team members. He makes all members stand in a row , and numbers them $1 \\cdots n$ from left to right.\u003c/p\u003e\n\u003cp\u003eThe ability of the $i$-th person is $w_i$ , and if there is a guy whose ability is not less than $w_i+m$ stands on his right , he will become angry. It means that the $j$-th person will make the $i$-th person angry if $j\u0026gt;i$ and $w_j \\ge w_i+m$.\u003c/p\u003e\n\u003cp\u003eWe define the anger of the $i$-th person as the number of people between him and the person , who makes him angry and the distance from him is the longest in those people. If there is no one who makes him angry , his anger is $-1$ .\u003c/p\u003e\n\u003cp\u003ePlease calculate the anger of every team member .\u003c/p\u003e\n\u003ch3\u003eInput\u003c/h3\u003e\n\u003cp\u003eThe first line contains two integers $n$ and $m(2\\leq n\\leq 5*10^5, 0\\leq m \\leq 10^9)$ .\u003c/p\u003e\n\u003cp\u003eThe following\u0026nbsp; line contain $n$ integers $w_1..w_n(0\\leq w_i \\leq 10^9)$ .\u003c/p\u003e\n\u003ch3\u003eOutput\u003c/h3\u003e\n\u003cp\u003eA row of $n$ integers separated by spaces , representing the anger of every member .\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\u003e6 1\n3 4 5 6 2 10\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e4 3 2 1 0 -1\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\u003cbr /\u003e"}}]}