{"trustable":true,"sections":[{"title":"Background","value":{"format":"MD","content":"因为 NOI 被虐傻了,蒟蒻的 YJQ 准备来学习一下字符串,于是它碰到了这样一道题:\n"}},{"title":"Description","value":{"format":"MD","content":"给你一个长为 $n$ 的字符串,求不同的子串的个数。\n\n我们定义两个子串不同,当且仅当有这两个子串长度不一样或者长度一样且有任意一位不一样。\n\n子串的定义:原字符串中连续的一段字符组成的字符串。\n"}},{"title":"Input","value":{"format":"MD","content":"第一行一个整数 $n$。\n\n接下来一行 $n$ 个字符表示给出的字符串。\n"}},{"title":"Output","value":{"format":"MD","content":"一行一个整数,表示不一样的子串个数。\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\u003e5\naabaa\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e11\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\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\u003e3\naba\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e5\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"Hint","value":{"format":"MD","content":"### 提示\n\n请使用64位整数来进行输出。\n\n### 数据规模与约定\n- 对于 $30\\%$ 的数据,保证 $n\\le 1000$。\n- 对于 $100\\%$ 的数据,保证 $1 \\leq n \\le 10^5$,字符串中只有小写英文字母。\n"}}]}