POJ 2752

KMP

#include 
#include 
#include 

using namespace std;

char b[400005];
int next[400005];
int n, m;

void getnext()
{
    int j,k;
    j=0;
    k=-1;
    next[0]=-1;
    while(j= 0; i--) {
			printf("%d ", ans[i]);
		}
		printf("%d\n", strlen(b));
	}
	return 0;
}


你可能感兴趣的:(String,algorithm,ACM)