0_0_34084869_29734.cpp:9:1: error: expected initializer before 'int'
int n, m, p;
^
0_0_34084869_29734.cpp: In function 'void getNext(int*)':
0_0_34084869_29734.cpp:14:5: error: 'nex' was not declared in this scope
nex[0] = -1;
^
0_0_34084869_29734.cpp:16:15: error: 'm' was not declared in this scope
while(i < m)
^
0_0_34084869_29734.cpp: In function 'int kmp(int*, int*)':
0_0_34084869_29734.cpp:26:16: error: 'm' was not declared in this scope
getNext(b, m);
^
0_0_34084869_29734.cpp:27:24: error: 'p' was not declared in this scope
for(int k = 0; k < p; k++)
^
0_0_34084869_29734.cpp:30:19: error: 'n' was not declared in this scope
while(i < n)
^
0_0_34084869_29734.cpp:32:47: error: 'nex' was not declared in this scope
while(j != -1 && a[i] != b[j])j = nex[j];
^
0_0_34084869_29734.cpp:34:35: error: 'nex' was not declared in this scope
if(j >= m){ans++; j = nex[j];}
^
0_0_34084869_29734.cpp: In function 'int main()':
0_0_34084869_29734.cpp:46:26: error: 'n' was not declared in this scope
scanf("%d%d%d", &n, &m, &p);
^
0_0_34084869_29734.cpp:46:30: error: 'm' was not declared in this scope
scanf("%d%d%d", &n, &m, &p);
^
0_0_34084869_29734.cpp:46:34: error: 'p' was not declared in this scope
scanf("%d%d%d", &n, &m, &p);
^
|