0_0_30200850_1000.cpp:11:17: error: 'string' has not been declared
void insert(string s){
^
0_0_30200850_1000.cpp:35:15: error: 'string' has not been declared
int query(string t){
^
0_0_30200850_1000.cpp: In member function 'void AC_automaton::init()':
0_0_30200850_1000.cpp:8:31: error: 'memset' was not declared in this scope
memset(tr,0,sizeof(tr));
^
0_0_30200850_1000.cpp: In member function 'void AC_automaton::insert(int)':
0_0_30200850_1000.cpp:13:24: error: invalid types 'int[int]' for array subscript
for(int i=0;s[i];i++){
^
0_0_30200850_1000.cpp:14:22: error: invalid types 'int[int]' for array subscript
int k=s[i]-'a';
^
0_0_30200850_1000.cpp: In member function 'void AC_automaton::build()':
0_0_30200850_1000.cpp:21:9: error: 'queue' was not declared in this scope
queue<int>q;
^
0_0_30200850_1000.cpp:21:15: error: expected primary-expression before 'int'
queue<int>q;
^
0_0_30200850_1000.cpp:22:35: error: 'memset' was not declared in this scope
memset(fail,0,sizeof(fail));
^
0_0_30200850_1000.cpp:23:44: error: 'q' was not declared in this scope
for(int i=0;i<kind;i++)if(tr[0][i])q.push(tr[0][i]);
^
0_0_30200850_1000.cpp:24:16: error: 'q' was not declared in this scope
while(!q.empty()){
^
0_0_30200850_1000.cpp: In member function 'int AC_automaton::query(int)':
0_0_30200850_1000.cpp:37:24: error: invalid types 'int[int]' for array subscript
for(int i=0;t[i];i++){
^
0_0_30200850_1000.cpp:38:24: error: invalid types 'int[int]' for array subscript
p=tr[p][t[i]-'a'];
^
0_0_30200850_1000.cpp: In function 'int main()':
0_0_30200850_1000.cpp:47:5: error: 'ios' has not been declared
ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
^
0_0_30200850_1000.cpp:47:29: error: 'cin' was not declared in this scope
ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
^
0_0_30200850_1000.cpp:47:40: error: 'cout' was not declared in this scope
ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
^
0_0_30200850_1000.cpp:57:13: error: 'string' was not declared in this scope
string s;
^
0_0_30200850_1000.cpp:58:18: error: 's' was not declared in this scope
cin>>s;
^
0_0_30200850_1000.cpp:62:9: error: 'string' was not declared in this scope
string s;
^
0_0_30200850_1000.cpp:63:14: error: 's' was not declared in this scope
cin>>s;
^
0_0_30200850_1000.cpp:64:28: error: 'endl' was not declared in this scope
cout<<ac.query(s)<<endl;
^
|