{"trustable":true,"prependHtml":"\u003cstyle type\u003d\"text/css\"\u003e\n section pre {\n display: block;\n padding: 9.5px;\n margin: 0 0 10px;\n font-size: 13px;\n line-height: 1.42857143;\n word-break: break-all;\n word-wrap: break-word;\n color: #333;\n background: rgba(255, 255, 255, 0.5);\n border: 1px solid #ccc;\n border-radius: 6px;\n }\n\u003c/style\u003e\n\u003cscript\u003e\n window.katexOptions \u003d {\n delimiters: [\n {left: \u0027\\\\(\u0027, right: \u0027\\\\)\u0027, display: false},\n {left: \u0027\\\\[\u0027, right: \u0027\\\\]\u0027, display: true}\n ]\n };\n\u003c/script\u003e\n","sections":[{"title":"Problem Statement","value":{"format":"HTML","content":"\r\n\u003csection\u003e\r\n\u003cp\u003eThere is a building with \u003cvar\u003e\\(n\\)\u003c/var\u003e rooms, numbered \u003cvar\u003e\\(1\\)\u003c/var\u003e to \u003cvar\u003e\\(n\\)\u003c/var\u003e.\u003c/p\u003e\r\n\u003cp\u003eWe can move from any room to any other room in the building.\u003c/p\u003e\r\n\u003cp\u003eLet us call the following event a \u003cstrong\u003emove\u003c/strong\u003e: a person in some room \u003cvar\u003e\\(i\\)\u003c/var\u003e goes to another room \u003cvar\u003e\\(j~ (i \\neq j)\\)\u003c/var\u003e.\u003c/p\u003e\r\n\u003cp\u003eInitially, there was one person in each room in the building.\u003c/p\u003e\r\n\u003cp\u003eAfter that, we know that there were exactly \u003cvar\u003e\\(k\\)\u003c/var\u003e moves happened up to now.\u003c/p\u003e\r\n\u003cp\u003eWe are interested in the number of people in each of the \u003cvar\u003e\\(n\\)\u003c/var\u003e rooms now. How many combinations of numbers of people in the \u003cvar\u003e\\(n\\)\u003c/var\u003e rooms are possible?\u003c/p\u003e\r\n\u003cp\u003eFind the count modulo \u003cvar\u003e\\((10^9 + 7)\\)\u003c/var\u003e.\u003c/p\u003e\r\n\u003c/section\u003e\r\n"}},{"title":"Constraints","value":{"format":"HTML","content":"\r\n\u003csection\u003e\r\n\u003cul\u003e\r\n\u003cli\u003eAll values in input are integers.\u003c/li\u003e\r\n\u003cli\u003e\u003cvar\u003e\\(3 \\leq n \\leq 2 \\times 10^5\\)\u003c/var\u003e\u003c/li\u003e\r\n\u003cli\u003e\u003cvar\u003e\\(2 \\leq k \\leq 10^9\\)\u003c/var\u003e\u003c/li\u003e\r\n\u003c/ul\u003e\r\n\u003c/section\u003e\r\n"}},{"title":"Input","value":{"format":"HTML","content":"\r\n\u003csection\u003e\r\n\u003cp\u003eInput is given from Standard Input in the following format:\u003c/p\u003e\r\n\u003cpre\u003e\u003cvar\u003e\\(n\\)\u003c/var\u003e \u003cvar\u003e\\(k\\)\u003c/var\u003e\r\n\u003c/pre\u003e\r\n\r\n\u003c/section\u003e\r\n"}},{"title":"Output","value":{"format":"HTML","content":"\r\n\u003csection\u003e\r\n\u003cp\u003ePrint the number of possible combinations of numbers of people in the \u003cvar\u003e\\(n\\)\u003c/var\u003e rooms now, modulo \u003cvar\u003e\\((10^9 + 7)\\)\u003c/var\u003e.\u003c/p\u003e\r\n\u003c/section\u003e\r\n"}},{"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\u003e3 2\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e10\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\r\n\u003csection\u003e\r\n\r\n\r\n\u003c/section\u003e\r\n\r\n\u003csection\u003e\r\n\r\n\r\n\u003cp\u003eLet \u003cvar\u003e\\(c_1\\)\u003c/var\u003e, \u003cvar\u003e\\(c_2\\)\u003c/var\u003e, and \u003cvar\u003e\\(c_3\\)\u003c/var\u003e be the number of people in Room \u003cvar\u003e\\(1\\)\u003c/var\u003e, \u003cvar\u003e\\(2\\)\u003c/var\u003e, and \u003cvar\u003e\\(3\\)\u003c/var\u003e now, respectively. There are \u003cvar\u003e\\(10\\)\u003c/var\u003e possible combination of \u003cvar\u003e\\((c_1, c_2, c_3)\\)\u003c/var\u003e:\u003c/p\u003e\r\n\u003cul\u003e\r\n\u003cli\u003e\u003cvar\u003e\\((0, 0, 3)\\)\u003c/var\u003e\u003c/li\u003e\r\n\u003cli\u003e\u003cvar\u003e\\((0, 1, 2)\\)\u003c/var\u003e\u003c/li\u003e\r\n\u003cli\u003e\u003cvar\u003e\\((0, 2, 1)\\)\u003c/var\u003e\u003c/li\u003e\r\n\u003cli\u003e\u003cvar\u003e\\((0, 3, 0)\\)\u003c/var\u003e\u003c/li\u003e\r\n\u003cli\u003e\u003cvar\u003e\\((1, 0, 2)\\)\u003c/var\u003e\u003c/li\u003e\r\n\u003cli\u003e\u003cvar\u003e\\((1, 1, 1)\\)\u003c/var\u003e\u003c/li\u003e\r\n\u003cli\u003e\u003cvar\u003e\\((1, 2, 0)\\)\u003c/var\u003e\u003c/li\u003e\r\n\u003cli\u003e\u003cvar\u003e\\((2, 0, 1)\\)\u003c/var\u003e\u003c/li\u003e\r\n\u003cli\u003e\u003cvar\u003e\\((2, 1, 0)\\)\u003c/var\u003e\u003c/li\u003e\r\n\u003cli\u003e\u003cvar\u003e\\((3, 0, 0)\\)\u003c/var\u003e\u003c/li\u003e\r\n\u003c/ul\u003e\r\n\u003cp\u003eFor example, \u003cvar\u003e\\((c_1, c_2, c_3)\\)\u003c/var\u003e will be \u003cvar\u003e\\((0, 1, 2)\\)\u003c/var\u003e if the person in Room \u003cvar\u003e\\(1\\)\u003c/var\u003e goes to Room \u003cvar\u003e\\(2\\)\u003c/var\u003e and then one of the persons in Room \u003cvar\u003e\\(2\\)\u003c/var\u003e goes to Room \u003cvar\u003e\\(3\\)\u003c/var\u003e.\u003c/p\u003e\r\n\u003c/section\u003e\r\n"}},{"title":"Sample 2","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\u003e200000 1000000000\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e607923868\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\r\n\u003csection\u003e\r\n\r\n\r\n\u003c/section\u003e\r\n\r\n\u003csection\u003e\r\n\r\n\r\n\u003cp\u003ePrint the count modulo \u003cvar\u003e\\((10^9 + 7)\\)\u003c/var\u003e.\u003c/p\u003e\r\n\u003c/section\u003e\r\n"}},{"title":"Sample 3","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\u003e15 6\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e22583772\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\r\n\u003csection\u003e\r\n\r\n\r\n\u003c/section\u003e\r\n\r\n\u003csection\u003e\r\n\u003c/section\u003e\r\n"}}]}