| 11 | }; |
| 12 | |
| 13 | struct naive_suffix_array { |
| 14 | string s; |
| 15 | int n; |
| 16 | int *idx; |
| 17 | |
| 18 | // naive_suffix_array(string s) : s(s + "\x0c"), n(size(s)+1) { |
| 19 | naive_suffix_array(string _s) : s(_s), n(size(s)) { |
| 20 | idx = new int[n]; |
| 21 | for (int i = 0; i < n; i++) idx[i] = i; |
| 22 | sort(idx, idx + n, cmp(idx,s)); |
| 23 | } |
| 24 | }; |
| 25 | |
| 26 | void make_sure_ok(string s) { |
| 27 | // s = s + "~"; |
nothing calls this directly
no outgoing calls
no test coverage detected