This documentation is automatically generated by online-judge-tools/verification-helper
#define PROBLEM "https://judge.yosupo.jp/problem/zalgorithm"
#include "base.hpp"
#include "util/fast_io.hpp"
#include "string/rollinghash.hpp"
int main() {
H::init(TEN(6));
Scanner sc(stdin);
Printer pr(stdout);
string s;
sc.read(s);
int n = int(s.size());
V<H> hs = {H()};
for (char c: s) {
H nh = hs.back() + H(c);
hs.push_back(nh);
}
dbg(H::powB[3]);
for (int i = 0; i < n; i++) {
int lw = 0, up = n - i + 1;
while (up - lw > 1) {
int md = (lw + up) / 2;
if (hs[md] == hs[i + md].strip_left(hs[i])) {
lw = md;
} else {
up = md;
}
}
pr.write(lw);
pr.write(' ');
}
pr.writeln();
}
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.10.1/x64/lib/python3.10/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 "/opt/hostedtoolcache/Python/3.10.1/x64/lib/python3.10/site-packages/onlinejudge_verify/languages/cplusplus.py", line 187, in bundle
bundler.update(path)
File "/opt/hostedtoolcache/Python/3.10.1/x64/lib/python3.10/site-packages/onlinejudge_verify/languages/cplusplus_bundle.py", line 401, in update
self.update(self._resolve(pathlib.Path(included), included_from=path))
File "/opt/hostedtoolcache/Python/3.10.1/x64/lib/python3.10/site-packages/onlinejudge_verify/languages/cplusplus_bundle.py", line 401, in update
self.update(self._resolve(pathlib.Path(included), included_from=path))
File "/opt/hostedtoolcache/Python/3.10.1/x64/lib/python3.10/site-packages/onlinejudge_verify/languages/cplusplus_bundle.py", line 260, in _resolve
raise BundleErrorAt(path, -1, "no such header")
onlinejudge_verify.languages.cplusplus_bundle.BundleErrorAt: math/comb.hpp: line -1: no such header