MCPcopy Create free account
hub / github.com/SuprDewd/CompetitiveProgramming / cmp

Class cmp

code/strings/suffix_array.test.cpp:4–11  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2/* Field testing: ICPC Live Archive 2755, ICPC Live Archive 4513, SPOJ DISUBSTR */
3
4struct cmp {
5 int *idx;
6 string s;
7 cmp(int *_idx, string _s) : idx(_idx), s(_s) { }
8 bool operator()(int a, int b) const {
9 return s.substr(a) < s.substr(b);
10 }
11};
12
13struct naive_suffix_array {
14 string s;

Callers 1

naive_suffix_arrayMethod · 0.70

Calls

no outgoing calls

Tested by 1

naive_suffix_arrayMethod · 0.56