from AtCoder Library Practice Contest ACLPC_I
-
- Build suffix array and also create LCP array
- The value of LCP is āthe number of identical substringsā, so subtract it from the number of all substrings
This page is auto-translated from [/nishio/ACLPC I](https://scrapbox.io/nishio/ACLPC I) using DeepL. If you looks something interesting but the auto-translated English is not good enough to understand it, feel free to let me know at @nishio_en. Iām very happy to spread my thought to non-Japanese readers.