0_0_15168034_13696.cpp: In function 'bool cmp(int, int)':
0_0_15168034_13696.cpp:3:9: error: 'rank' was not declared in this scope
if (rank[i] != rank[j]) return rank[i] < rank[j];
^
0_0_15168034_13696.cpp:4:18: error: 'k' was not declared in this scope
int ri = i + k < n ? rank[i+k] : -INF;
^
0_0_15168034_13696.cpp:4:22: error: 'n' was not declared in this scope
int ri = i + k < n ? rank[i+k] : -INF;
^
0_0_15168034_13696.cpp:4:26: error: 'rank' was not declared in this scope
int ri = i + k < n ? rank[i+k] : -INF;
^
0_0_15168034_13696.cpp:4:39: error: 'INF' was not declared in this scope
int ri = i + k < n ? rank[i+k] : -INF;
^
0_0_15168034_13696.cpp: In function 'void getsa()':
0_0_15168034_13696.cpp:11:25: error: 'n' was not declared in this scope
for (int i = 0; i < n; i++)
^
0_0_15168034_13696.cpp:13:9: error: 'sa' was not declared in this scope
sa[i] = i;
^
0_0_15168034_13696.cpp:14:9: error: 'rank' was not declared in this scope
rank[i] = arr[i];
^
0_0_15168034_13696.cpp:14:19: error: 'arr' was not declared in this scope
rank[i] = arr[i];
^
0_0_15168034_13696.cpp:16:10: error: 'k' was not declared in this scope
for (k = 1; k < n; k *= 2)
^
0_0_15168034_13696.cpp:16:21: error: 'n' was not declared in this scope
for (k = 1; k < n; k *= 2)
^
0_0_15168034_13696.cpp:18:14: error: 'sa' was not declared in this scope
sort(sa, sa + n, cmp);
^
0_0_15168034_13696.cpp:18:29: error: 'sort' was not declared in this scope
sort(sa, sa + n, cmp);
^
0_0_15168034_13696.cpp:19:9: error: 'tmp' was not declared in this scope
tmp[sa[0]] = 0;
^
0_0_15168034_13696.cpp:22:37: error: 'rank' was not declared in this scope
for (int i = 0; i < n; i++) rank[i] = tmp[i];
^
0_0_15168034_13696.cpp: In function 'void getlcp()':
0_0_15168034_13696.cpp:28:25: error: 'n' was not declared in this scope
for (int i = 0; i < n; i++)
^
0_0_15168034_13696.cpp:29:9: error: 'rank' was not declared in this scope
rank[sa[i]] = i;
^
0_0_15168034_13696.cpp:29:14: error: 'sa' was not declared in this scope
rank[sa[i]] = i;
^
0_0_15168034_13696.cpp:31:5: error: 'lcp' was not declared in this scope
lcp[n-1] = 0;
^
0_0_15168034_13696.cpp:31:9: error: 'n' was not declared in this scope
lcp[n-1] = 0;
^
0_0_15168034_13696.cpp:34:17: error: 'sa' was not declared in this scope
int j = sa[rank[i]-1];
^
0_0_15168034_13696.cpp:34:20: error: 'rank' was not declared in this scope
int j = sa[rank[i]-1];
^
0_0_15168034_13696.cpp:38:17: error: 'arr' was not declared in this scope
if (arr[i+h] != arr[j+h]) break;
^
|