{"trustable":true,"prependHtml":"\u003cstyle type\u003d\u0027text/css\u0027\u003e\n .input, .output {\n border: 1px solid #888888;\n }\n .output {\n margin-bottom: 1em;\n position: relative;\n top: -1px;\n }\n .output pre, .input pre {\n background-color: #EFEFEF;\n line-height: 1.25em;\n margin: 0;\n padding: 0.25em;\n }\n \u003c/style\u003e\n \u003clink rel\u003d\"stylesheet\" href\u003d\"//codeforces.org/s/96598/css/problem-statement.css\" type\u003d\"text/css\" /\u003e\u003cscript\u003e window.katexOptions \u003d { disable: true }; \u003c/script\u003e\n\u003cscript type\u003d\"text/x-mathjax-config\"\u003e\n MathJax.Hub.Config({\n tex2jax: {\n inlineMath: [[\u0027$$$\u0027,\u0027$$$\u0027], [\u0027$\u0027,\u0027$\u0027]],\n displayMath: [[\u0027$$$$$$\u0027,\u0027$$$$$$\u0027], [\u0027$$\u0027,\u0027$$\u0027]]\n }\n });\n\u003c/script\u003e\n\u003cscript type\u003d\"text/javascript\" async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS_HTML-full\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003eYou are given a number $$$k$$$ and a string $$$s$$$ of length $$$n$$$, consisting of the characters \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003e.\u003c/span\u003e\u0027 and \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003e*\u003c/span\u003e\u0027. You want to replace some of the \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003e*\u003c/span\u003e\u0027 characters with \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003ex\u003c/span\u003e\u0027 characters so that the following conditions are met: \u003c/p\u003e\u003cul\u003e \u003cli\u003e The first character \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003e*\u003c/span\u003e\u0027 in the original string should be replaced with \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003ex\u003c/span\u003e\u0027; \u003c/li\u003e\u003cli\u003e The last character \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003e*\u003c/span\u003e\u0027 in the original string should be replaced with \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003ex\u003c/span\u003e\u0027; \u003c/li\u003e\u003cli\u003e The distance between two neighboring replaced characters \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003ex\u003c/span\u003e\u0027 must not exceed $$$k$$$ (more formally, if you replaced characters at positions $$$i$$$ and $$$j$$$ ($$$i \u0026lt; j$$$) and at positions $$$[i+1, j-1]$$$ there is no \u003cspan class\u003d\"tex-font-style-tt\"\u003e\"x\"\u003c/span\u003e symbol, then $$$j-i$$$ must be no more than $$$k$$$). \u003c/li\u003e\u003c/ul\u003e\u003cp\u003eFor example, if $$$n\u003d7$$$, $$$s\u003d$$$\u003cspan class\u003d\"tex-font-style-tt\"\u003e.**.***\u003c/span\u003e and $$$k\u003d3$$$, then the following strings will satisfy the conditions above: \u003c/p\u003e\u003cul\u003e \u003cli\u003e \u003cspan class\u003d\"tex-font-style-tt\"\u003e.xx.*xx\u003c/span\u003e; \u003c/li\u003e\u003cli\u003e \u003cspan class\u003d\"tex-font-style-tt\"\u003e.x*.x*x\u003c/span\u003e; \u003c/li\u003e\u003cli\u003e \u003cspan class\u003d\"tex-font-style-tt\"\u003e.xx.xxx\u003c/span\u003e. \u003c/li\u003e\u003c/ul\u003e But, for example, the following strings will not meet the conditions: \u003cul\u003e \u003cli\u003e \u003cspan class\u003d\"tex-font-style-tt\"\u003e.**.*xx\u003c/span\u003e (the first character \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003e*\u003c/span\u003e\u0027 should be replaced with \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003ex\u003c/span\u003e\u0027); \u003c/li\u003e\u003cli\u003e \u003cspan class\u003d\"tex-font-style-tt\"\u003e.x*.xx*\u003c/span\u003e (the last character \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003e*\u003c/span\u003e\u0027 should be replaced with \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003ex\u003c/span\u003e\u0027); \u003c/li\u003e\u003cli\u003e \u003cspan class\u003d\"tex-font-style-tt\"\u003e.x*.*xx\u003c/span\u003e (the distance between characters at positions $$$2$$$ and $$$6$$$ is greater than $$$k\u003d3$$$). \u003c/li\u003e\u003c/ul\u003e\u003cp\u003eGiven $$$n$$$, $$$k$$$, and $$$s$$$, find the minimum number of \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003e*\u003c/span\u003e\u0027 characters that must be replaced with \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003ex\u003c/span\u003e\u0027 in order to meet the above conditions.\u003c/p\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003eThe first line contains one integer $$$t$$$ ($$$1 \\le t \\le 500$$$). Then $$$t$$$ test cases follow.\u003c/p\u003e\u003cp\u003eThe first line of each test case contains two integers $$$n$$$ and $$$k$$$ ($$$1 \\le k \\le n \\le 50$$$).\u003c/p\u003e\u003cp\u003eThe second line of each test case contains a string $$$s$$$ of length $$$n$$$, consisting of the characters \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003e.\u003c/span\u003e\u0027 and \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003e*\u003c/span\u003e\u0027.\u003c/p\u003e\u003cp\u003eIt is guaranteed that there is at least one \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003e*\u003c/span\u003e\u0027 in the string $$$s$$$.\u003c/p\u003e\u003cp\u003eIt is guaranteed that the distance between any two neighboring \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003e*\u003c/span\u003e\u0027 characters does not exceed $$$k$$$.\u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003eFor each test case output the minimum number of \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003e*\u003c/span\u003e\u0027 characters that must be replaced with \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003ex\u003c/span\u003e\u0027 characters in order to satisfy the conditions above.\u003c/p\u003e"}},{"title":"Examples","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\u003e5\n7 3\n.**.***\n5 1\n..*..\n5 2\n*.*.*\n3 2\n*.*\n1 1\n*\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e3\n1\n3\n2\n1\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}