0_0_32887613_6662.cpp:7:7: error: 'll' does not name a type
const ll maxn=500005;
^
0_0_32887613_6662.cpp:11:10: error: 'maxn' was not declared in this scope
string w[maxn],p,s;
^
0_0_32887613_6662.cpp:12:9: error: 'maxn' was not declared in this scope
ll trie[maxn][27];
^
0_0_32887613_6662.cpp:13:12: error: 'maxn' was not declared in this scope
ll cntword[maxn];
^
0_0_32887613_6662.cpp:14:9: error: 'maxn' was not declared in this scope
ll fail[maxn];
^
0_0_32887613_6662.cpp:15:11: error: 'maxn' was not declared in this scope
ll length[maxn];
^
0_0_32887613_6662.cpp:16:8: error: 'maxn' was not declared in this scope
ll ans[maxn];
^
0_0_32887613_6662.cpp:17:8: error: 'maxn' was not declared in this scope
ll pos[maxn];
^
0_0_32887613_6662.cpp: In function 'll insert(std::string)':
0_0_32887613_6662.cpp:26:7: error: 'trie' was not declared in this scope
if(!trie[pos][next])
^
0_0_32887613_6662.cpp:29:4: error: 'length' was not declared in this scope
length[cnt]=i+1;
^
0_0_32887613_6662.cpp:31:7: error: 'trie' was not declared in this scope
pos=trie[pos][next];
^
0_0_32887613_6662.cpp:33:2: error: 'cntword' was not declared in this scope
cntword[pos]=1; //这里不再是++了,因为如果有两个q串相同,不应该加2,而仍应该加1
^
0_0_32887613_6662.cpp: In function 'void getfail()':
0_0_32887613_6662.cpp:40:6: error: 'trie' was not declared in this scope
if(trie[0][i])
^
0_0_32887613_6662.cpp:42:4: error: 'fail' was not declared in this scope
fail[trie[0][i]]=0;
^
0_0_32887613_6662.cpp:51:7: error: 'trie' was not declared in this scope
if(trie[now][i])
^
0_0_32887613_6662.cpp:53:5: error: 'fail' was not declared in this scope
fail[trie[now][i]]=trie[fail[now]][i];
^
0_0_32887613_6662.cpp:58:23: error: 'fail' was not declared in this scope
trie[now][i]=trie[fail[now]][i];
^
0_0_32887613_6662.cpp: In function 'void query(std::string)':
0_0_32887613_6662.cpp:68:7: error: 'trie' was not declared in this scope
now=trie[now][str[i]-'a'];
^
0_0_32887613_6662.cpp:70:20: error: 'fail' was not declared in this scope
for(ll j=now;j;j=fail[j])
^
0_0_32887613_6662.cpp:73:21: error: 'length' was not declared in this scope
cout<<"length="<<length[j]<<endl;
^
0_0_32887613_6662.cpp:74:7: error: 'cntword' was not declared in this scope
if(cntword[j]&&length[j]<=((len-1)/2+1))
^
0_0_32887613_6662.cpp:76:5: error: 'ans' was not declared in this scope
ans[j]+=cntword[j];
^
0_0_32887613_6662.cpp: In function 'int main()':
0_0_32887613_6662.cpp:90:10: error: 'trie' was not declared in this scope
memset(trie,0,sizeof(trie));
^
0_0_32887613_6662.cpp:91:10: error: 'cntword' was not declared in this scope
memset(cntword,0,sizeof(cntword));
^
0_0_32887613_6662.cpp:92:10: error: 'fail' was not declared in this scope
memset(fail,0,sizeof(fail));
^
0_0_32887613_6662.cpp:93:10: error: 'length' was not declared in this scope
memset(length,0,sizeof(length));
^
0_0_32887613_6662.cpp:94:10: error: 'ans' was not declared in this scope
memset(ans,0,sizeof(ans));
^
0_0_32887613_6662.cpp:100:9: error: 'w' was not declared in this scope
cin>>w[i];
^
0_0_32887613_6662.cpp:109:4: error: 'pos' was not declared in this scope
pos[i]=insert(s);
^
0_0_32887613_6662.cpp:113:10: error: 'w' was not declared in this scope
query(w[i]);
^
0_0_32887613_6662.cpp:115:22: error: 'pos' was not declared in this scope
printf("%d\n",ans[pos[i]]);
^
|