This documentation is automatically generated by online-judge-tools/verification-helper
# verification-helper: PROBLEM https://judge.yosupo.jp/problem/number_of_substrings
import cplib/str/static_string
import algorithm
var S = stdin.readLine().toStaticString()
var tmp : seq[StaticString]
for i in 0..<len(S):
tmp.add(S[i..<len(S)])
tmp.sort()
var sm = 0
for i in 0..<(len(S)-1):
sm += lcp(tmp[i],tmp[i+1])
echo len(S)*(len(S)+1) div 2 - sm
Traceback (most recent call last):
File "/home/runner/.local/lib/python3.12/site-packages/onlinejudge_verify/documentation/build.py", line 71, in _render_source_code_stat
bundled_code = language.bundle(stat.path, basedir=basedir, options={'include_paths': [basedir]}).decode()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/.local/lib/python3.12/site-packages/onlinejudge_verify/languages/nim.py", line 86, in bundle
raise NotImplementedError
NotImplementedError