摘要:String Given a string S and two integers L and M, we consider a substring of S as “recoverable” if and only if (i) It is of length M*L; (ii) It can be
阅读全文
摘要:#include #define MAX 100005 using namespace std; typedef long long ll; char W[MAX],T[MAX]; int nxt[MAX]; void getnext(int lenW) { int i=0,j=-1; nxt[i]=-1; while(i<lenW) { if(j...
阅读全文
摘要:Common Subsequence A subsequence of a given sequence is the given sequence with some elements (possible none) left out. Given a sequence X = < x1, x2,
阅读全文