{"trustable":false,"prependHtml":"\u003cscript\u003e\n window.katexOptions \u003d {\n delimiters: [\n {left: \u0027\\\\(\u0027, right: \u0027\\\\)\u0027, display: false},\n ]\n };\n\u003c/script\u003e\n","sections":[{"title":"","value":{"format":"HTML","content":"\t\u003cscript type\u003d\"text/x-mathjax-config\"\u003e\n\t MathJax.Hub.Config({\n\t extensions: [\"tex2jax.js\"],\n\t jax: [\"input/TeX\", \"output/SVG\"],\n\t tex2jax: {\n\t inlineMath: [ [\u0027$\u0027,\u0027$\u0027], [\"\\\\(\",\"\\\\)\"] ],\n\t displayMath: [ [\u0027$$\u0027,\u0027$$\u0027], [\"\\\\[\",\"\\\\]\"] ],\n\t processEscapes: true\n\t },\n\t });\n\t\u003c/script\u003e\n\t\u003cscript type\u003d\"text/javascript\"\n\t src\u003d\"https://cdn.staticfile.org/mathjax/2.7.0/MathJax.js\"\u003e\n\t\u003c/script\u003e\n \n \u003cp\u003e 给n个士兵排队,每个士兵三种G、R、P可选,求至少有m个连续G士兵,最多有k个连续R士兵的排列的种数。\u003c/p\u003e \n "}},{"title":"Input","value":{"format":"HTML","content":"\u003c/h4\u003e \n \u003cp\u003e There are multiple test cases. For each case, there is a line containing \u003cvar\u003e3\u003c/var\u003e integers \u003cvar\u003eN\u003c/var\u003e (0 \u0026lt; \u003cvar\u003eN\u003c/var\u003e \u0026lt; 1000000), \u003cvar\u003eM\u003c/var\u003e (0 \u0026lt; \u003cvar\u003eM\u003c/var\u003e \u0026lt; 10000) and \u003cvar\u003eK\u003c/var\u003e (0 \u0026lt; \u003cvar\u003eK\u003c/var\u003e \u0026lt; 10000), separated by spaces. \u003c/p\u003e \n \u003ch4"}},{"title":"Output","value":{"format":"HTML","content":"\u003c/h4\u003e \n \u003cp\u003e One line for each case, you should output the number of ways mod 1000000007. \u003c/p\u003e \n \u003ch4"}},{"title":"Sample Input","value":{"format":"HTML","content":"\u003c/h4\u003e \n \u003cpre\u003e3 2 2\n\u003c/pre\u003e \n \u003ch4"}},{"title":"Sample Output","value":{"format":"HTML","content":"\u003c/h4\u003e \n \u003cpre\u003e5\n\u003c/pre\u003e \n \u003ch4"}},{"title":"Hint","value":{"format":"HTML","content":"\u003c/h4\u003e \n \u003cp\u003eDenote the Garrison, the Recon Corp and the Military Police as G, R and P. Reasonable arrangements are: GGG, GGR, GGP, RGG, PGG.\u003c/p\u003e \n "}}]}