0_0_22311576_7897.cpp:10:9: error: 'maxn' was not declared in this scope
int son[maxn][26],pre[maxn],step[maxn],last,total,root;//son儿子边是否存在 pre可以理解为parent树上的父节点 step到达i节点走的最长步数
^
0_0_22311576_7897.cpp:10:23: error: 'maxn' was not declared in this scope
int son[maxn][26],pre[maxn],step[maxn],last,total,root;//son儿子边是否存在 pre可以理解为parent树上的父节点 step到达i节点走的最长步数
^
0_0_22311576_7897.cpp:10:34: error: 'maxn' was not declared in this scope
int son[maxn][26],pre[maxn],step[maxn],last,total,root;//son儿子边是否存在 pre可以理解为parent树上的父节点 step到达i节点走的最长步数
^
0_0_22311576_7897.cpp: In function 'void push_back(int)':
0_0_22311576_7897.cpp:13:5: error: 'step' was not declared in this scope
step[++total]=v;
^
0_0_22311576_7897.cpp: In function 'void Extend(int)':
0_0_22311576_7897.cpp:17:15: error: 'step' was not declared in this scope
push_back(step[last]+1);//新建ch的节点
^
0_0_22311576_7897.cpp:19:12: error: 'son' was not declared in this scope
for (;!son[p][ch]; p=pre[p]) son[p][ch]=np;//找到有ch出边的节点
^
0_0_22311576_7897.cpp:19:26: error: 'pre' was not declared in this scope
for (;!son[p][ch]; p=pre[p]) son[p][ch]=np;//找到有ch出边的节点
^
0_0_22311576_7897.cpp:20:13: error: 'pre' was not declared in this scope
if (!p) pre[np]=root;//如果都没有则指向root
^
0_0_22311576_7897.cpp:23:15: error: 'son' was not declared in this scope
int q=son[p][ch];
^
0_0_22311576_7897.cpp:29:13: error: 'pre' was not declared in this scope
pre[nq]=pre[q];
^
0_0_22311576_7897.cpp:33:14: error: 'pre' was not declared in this scope
else pre[np]=q;
^
0_0_22311576_7897.cpp: In function 'void Build(char*)':
0_0_22311576_7897.cpp:40:12: error: 'son' was not declared in this scope
memset(son,0,sizeof(son));
^
0_0_22311576_7897.cpp:41:12: error: 'pre' was not declared in this scope
memset(pre,0,sizeof(pre));
^
0_0_22311576_7897.cpp:42:12: error: 'step' was not declared in this scope
memset(step,0,sizeof(step));
^
0_0_22311576_7897.cpp: In function 'bool sovle(char*, int)':
0_0_22311576_7897.cpp:52:16: error: 'son' was not declared in this scope
if(son[p][s1[i]-'a'])//p节点有s1[i]的出边
^
0_0_22311576_7897.cpp:57:23: error: 'pre' was not declared in this scope
p=pre[p];
^
0_0_22311576_7897.cpp:60:25: error: 'step' was not declared in this scope
tmp=step[p]+1;
^
0_0_22311576_7897.cpp: At global scope:
0_0_22311576_7897.cpp:71:12: error: 'maxn' was not declared in this scope
string str[maxn];
^
0_0_22311576_7897.cpp: In function 'int main()':
0_0_22311576_7897.cpp:83:18: error: 'str' was not declared in this scope
cin>>str[i];
^
0_0_22311576_7897.cpp:91:23: error: 'str' was not declared in this scope
Build((char *)str[ind].c_str());
^
|