MCPcopy Create free account
hub / github.com/atcoder/ac-library / main

Function main

test/example/sa_usage.cpp:8–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6using namespace atcoder;
7
8int main() {
9 string s = "missisippi";
10
11 vector<int> sa = suffix_array(s);
12
13 vector<string> answer = {
14 "i",
15 "ippi",
16 "isippi",
17 "issisippi",
18 "missisippi",
19 "pi",
20 "ppi",
21 "sippi",
22 "sisippi",
23 "ssisippi",
24 };
25
26 assert(sa.size() == answer.size());
27 for (int i = 0; i < int(sa.size()); i++) {
28 assert(s.substr(sa[i]) == answer[i]);
29 }
30}

Callers

nothing calls this directly

Calls 2

suffix_arrayFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected