{"trustable":true,"prependHtml":"\u003cstyle type\u003d\"text/css\"\u003e\n div.illustration {\n float: right;\n padding-left: 20px;\n }\n div.illustration .illustration {\n width: 100%;\n border-radius: 4px;\n }\n pre {\n display: block;\n margin: 0 0 10px;\n font-size: 13px;\n line-height: 1.42857143;\n color: #333;\n word-break: break-all;\n word-wrap: break-word;\n }\n\u003c/style\u003e\n\u003cscript\u003e\n window.katexOptions \u003d {\n delimiters: [\n {left: \u0027\\\\[\u0027, right: \u0027\\\\]\u0027, display: true}\n ]\n };\n\u003c/script\u003e\n","sections":[{"title":"","value":{"format":"HTML","content":"\n \u003cdiv style\u003d\"width:40.00%\" class\u003d\"illustration\"\u003e\n \u003cimg src\u003d\"CDN_BASE_URL/3d6cdcfd06e74a6346056aa5c5a1a68e?v\u003d1715783457\" alt\u003d\"/problems/color/file/statement/en/img-0001.jpg\" class\u003d\"illustration\"\u003e\n\n \n \u003c/div\u003e\n\n \u003cp\u003eHaving discolored his white socks in a rather beige shade\n (as seen on the picture), Luktas Svettocek realised he can’t\n just throw all his laundry into one machine and expect it to\n retain its original colors. However, he is also too lazy to do\n his laundry in several rounds. He would much rather buy more\n laundry machines!\u003c/p\u003e\n\n \u003cp\u003eEach of Luktas’ socks have a color \u003cspan class\u003d\"tex2jax_process\"\u003e$D_ i$\u003c/span\u003e which has a number between\n \u003cspan class\u003d\"tex2jax_process\"\u003e$0$\u003c/span\u003e and \u003cspan class\u003d\"tex2jax_process\"\u003e$10^9$\u003c/span\u003e assigned to it. After some\n experimentation, he found that he could wash any socks with a\n maximum absolute color difference of \u003cspan class\u003d\"tex2jax_process\"\u003e$K$\u003c/span\u003e in the same machine without any\n discoloring. The color difference of two socks \u003cspan class\u003d\"tex2jax_process\"\u003e$i$\u003c/span\u003e and \u003cspan class\u003d\"tex2jax_process\"\u003e$j$\u003c/span\u003e is \u003cspan class\u003d\"tex2jax_process\"\u003e$|D_ i - D_ j|$\u003c/span\u003e.\u003c/p\u003e\n\n \u003cp\u003eLuktas now needs to know how many washing machines he needs\n to wash his \u003cspan class\u003d\"tex2jax_process\"\u003e$S$\u003c/span\u003e socks,\n given that each machine can take at most \u003cspan class\u003d\"tex2jax_process\"\u003e$C$\u003c/span\u003e socks a time.\u003c/p\u003e\n\n \u003ch2\u003eInput\u003c/h2\u003e\n\n \u003cp\u003eThe first line consists of three integers \u003cspan class\u003d\"tex2jax_process\"\u003e$1 \\le S, C \\le 10^5$\u003c/span\u003e and \u003cspan class\u003d\"tex2jax_process\"\u003e$0 \\le K \\le 10^9$\u003c/span\u003e, the number of\n socks, the capacity of a laundry machine and the maximum color\n difference, respectively. Then follow one line with\n \u003cspan class\u003d\"tex2jax_process\"\u003e$S$\u003c/span\u003e integers; these are\n the color values \u003cspan class\u003d\"tex2jax_process\"\u003e$D_ i$\u003c/span\u003e of\n every sock.\u003c/p\u003e\n\n \u003ch2\u003eOutput\u003c/h2\u003e\n\n \u003cp\u003eOutput a single integer; the number of machines Luktas needs\n to wash all his socks.\u003c/p\u003e\n\n \u003ch2\u003eSample 1\u003c/h2\u003e\u003cbody\u003e\u003ctable class\u003d\"vjudge_sample\"\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\u003e5 3 0\n0 0 1 1 2\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e3\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\u003c/body\u003e\n\n \u003ch2\u003eSample 2\u003c/h2\u003e\u003cbody\u003e\u003ctable class\u003d\"vjudge_sample\"\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\u003e5 3 1\n0 0 1 1 2\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e2\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\u003c/body\u003e\n "}}]}