This documentation is automatically generated by online-judge-tools/verification-helper
#include "lib/str/kmp.hpp"
#pragma once
#include "lib/internal.hpp"
std::vector<int> prefix_function(const std::string &s)
{
int n = s.size();
std::vector<int> p(n + 1);
p[0] = p[1] = 0;
for (int i = 1; i < n; i++) {
int t = p[i];
while (t > 0 && s[t] != s[i]) t = p[t];
if (s[t] == s[i]) t++;
p[i + 1] = t;
}
return p;
}
Traceback (most recent call last):
File "/home/runner/.local/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 "/home/runner/.local/lib/python3.10/site-packages/onlinejudge_verify/languages/cplusplus.py", line 187, in bundle
bundler.update(path)
File "/home/runner/.local/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 "/home/runner/.local/lib/python3.10/site-packages/onlinejudge_verify/languages/cplusplus_bundle.py", line 312, in update
raise BundleErrorAt(path, i + 1, "#pragma once found in a non-first line")
onlinejudge_verify.languages.cplusplus_bundle.BundleErrorAt: lib/internal.hpp: line 4: #pragma once found in a non-first line