{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003eNow you have a string consists of uppercase letters, two integers $A$ and $B$. We call a substring wonderful substring when the times it appears in that string is between $A$ and $B$ ($A \\le times \\le B$). Can you calculate the number of wonderful substrings in that string?\u003c/p\u003e\u003ch3\u003eInput\u003c/h3\u003e\u003cp\u003eInput has multiple test cases.\u003c/p\u003e\u003cp\u003eFor each line, there is a string $S$, two integers $A$ and $B$.\u003c/p\u003e\u003cp\u003e$\\sum length(S) \\le 2 \\times 10^6$, \u003c/p\u003e\u003cp\u003e$1 \\le A \\le B \\le length(S)$\u003c/p\u003e\u003ch3\u003eOutput\u003c/h3\u003e\u003cp\u003eFor each test case, print the number of the wonderful substrings in a line.\u003c/p\u003e"}},{"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\u003eAAA 2 3\nABAB 2 2\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e2\n3\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\u003cbr /\u003e"}}]}