{"trustable":false,"sections":[{"title":"","value":{"format":"HTML","content":"\u003chtml\u003e\n \u003chead\u003e\u003c/head\u003e\n \u003cbody\u003e\n \u003cdiv id\u003d\"problem-body\"\u003e \n \u003cp\u003e给一个长度不超过90000的串S,每次询问它的所有不同子串中,字典序第K小的,询问不超过500个。\u003c/p\u003e \n \u003cp\u003e\u003cbr\u003eAfter knowing the huge number of questions Kinan will ask, Daniel figured out that he can\u0027t do this alone. Daniel, of course, knows your exceptional programming skills, so he asked you to write him a program which given \u003cstrong\u003eS\u003c/strong\u003e will answer Kinan\u0027s questions.\u003cbr\u003e\u003cstrong\u003e\u003cbr\u003eExample:\u003c/strong\u003e\u003c/p\u003e \n \u003cp\u003e\u003cbr\u003e\u003cstrong\u003eS\u003c/strong\u003e \u003d \"aaa\" (without quotes)\u003cbr\u003esubstrings of S are \"a\" , \"a\" , \"a\" , \"aa\" , \"aa\" , \"aaa\". The sorted list of substrings will be:\u003cbr\u003e\"a\", \"aa\", \"aaa\".\u003c/p\u003e \n \u003cp\u003e\u0026nbsp;\u003c/p\u003e \n \u003ch3 style\u003d\"text-align: center;\"\u003eInput\u003c/h3\u003e \n \u003cp\u003eIn the first line there is Kinan\u0027s string \u003cstrong\u003eS\u003c/strong\u003e (with length no more than 90000 characters). It contains only small letters of English alphabet. The second line contains a single integer \u003cstrong\u003eQ\u003c/strong\u003e (\u003cstrong\u003eQ\u003c/strong\u003e \u0026lt;\u003d 500) , the number of questions Daniel will be asked. In the next \u003cstrong\u003eQ\u003c/strong\u003e lines a single integer \u003cstrong\u003eK\u003c/strong\u003e is given (0 \u0026lt; \u003cstrong\u003eK\u003c/strong\u003e \u0026lt; 2^31).\u003c/p\u003e \n \u003ch3 style\u003d\"text-align: center;\"\u003eOutput\u003c/h3\u003e \n \u003cp\u003eOutput consists of \u003cstrong\u003eQ\u003c/strong\u003e lines, the \u003cstrong\u003ei-th \u003c/strong\u003econtains a string which is the answer to the \u003cstrong\u003ei-th\u003c/strong\u003e asked question.\u003c/p\u003e \n \u003ch3\u003eExample\u003c/h3\u003e \n \u003cpre\u003e\u003cstrong\u003eInput:\u003c/strong\u003e\u003cbr\u003eaaa\u003cbr\u003e2\u003cbr\u003e2\u003cbr\u003e3\u003cbr\u003e\u003cbr\u003e\u003cstrong\u003eOutput:\u003c/strong\u003e\naa\u003cbr\u003eaaa\u003cbr\u003e\u003c/pre\u003e \n \u003cp\u003e\u003cb\u003eEdited:\u003c/b\u003e Some input file contains garbage at the end. Do not process them. \u003c/p\u003e \n \u003c/div\u003e\n \u003c/body\u003e\n\u003c/html\u003e"}}]}