{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"\u003chtml\u003e\n \u003chead\u003e\u003c/head\u003e\n \u003cbody\u003e\n \u003cpre style\u003d\"line-height: normal; widows: 1; text-transform: none; font-variant: normal; font-style: normal; text-indent: 0px; letter-spacing: normal; color: rgb(0,0,0); font-weight: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px\"\u003e\r\n给你一个字符串S,Q个询问.对于每个询问L和R输出L~R之间的不同回文串有多少个\u003c/pre\u003e \n \u003cp\u003e\u003c/p\u003e\n \u003c/body\u003e\n\u003c/html\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003chtml\u003e\n \u003chead\u003e\u003c/head\u003e\n \u003cbody\u003e\n \u003cpre style\u003d\"line-height: normal; widows: 1; text-transform: none; font-variant: normal; font-style: normal; text-indent: 0px; letter-spacing: normal; color: rgb(0,0,0); font-weight: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px\"\u003e\r\n第一行一个整数T表示有T个样例 T\u0026lt;\u003d1000\r\n对于每个样例,\r\n第一行输入一个只保含\u0027a\u0027~\u0027z\u0027的字符串S ( 长度在1000以内)\r\n第二行输入一个整数Q (1\u0026lt;\u003dQ\u0026lt;\u003d200)\r\n接下来Q行每行一个L,R表示询问区间[L,R] 字符串从1开始计数\u003c/pre\u003e\n \u003c/body\u003e\n\u003c/html\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003chtml\u003e\n \u003chead\u003e\u003c/head\u003e\n \u003cbody\u003e\n \u003cp\u003e\u003cspan style\u003d\"widows: 1; text-transform: none; text-indent: 0px; display: inline !important; font: medium Simsun; white-space: normal; float: none; letter-spacing: normal; color: rgb(0,0,0); word-spacing: 0px; -webkit-text-stroke-width: 0px\"\u003e每一个样例第一行输出\"Case #%d:\"表示样例号, 对于每一个询问输出一行,包含一个整数表示[L,R]间有多少个不同的回文串\u003c/span\u003e\u003c/p\u003e\n \u003c/body\u003e\n\u003c/html\u003e"}},{"title":"Sample Input","value":{"format":"HTML","content":"\u003cpre\u003e2\r\nabcbaaaaabab\r\n5\r\n1 12\r\n1 5\r\n5 9\r\n9 12\r\n3 5\r\naaaaaaaaaaaaaaaaaaaaaaaaaaaaa\r\n8\r\n1 20\r\n2 21\r\n3 12\r\n5 6\r\n6 6\r\n10 12\r\n10 20\r\n10 28\u003c/pre\u003e"}},{"title":"Sample Output","value":{"format":"HTML","content":"\u003cpre\u003eCase #1:\r\n12\r\n5\r\n5\r\n4\r\n3\r\nCase #2:\r\n20\r\n20\r\n10\r\n2\r\n1\r\n3\r\n11\r\n19\u003c/pre\u003e"}},{"title":"Hint","value":{"format":"HTML","content":"\u003chtml\u003e\n \u003chead\u003e\u003c/head\u003e\n \u003cbody\u003e\u003c/body\u003e\n\u003c/html\u003e"}}]}