摘要: Description A string is finite sequence of characters over a non-empty finite set Σ. In this problem, Σ is the set of lowercase letters. Substring, al 阅读全文
posted @ 2016-08-24 15:09 wust_ouyangli 阅读(123) 评论(0) 推荐(0) 编辑
摘要: 代码 //确认maxn大小,一般是原字符串长度最大值的2倍,然后是init(),最后是一个一个的字符插入, //转化成对应的数字,调用Insert函数,可支持在线。 struct SAM { int ch[maxn][26]; int pre[maxn],step[maxn]; int last,i 阅读全文
posted @ 2016-08-24 14:59 wust_ouyangli 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 代码 //maxn,n取二分图两方中点数的最大值,首先init,然后在输入中加边AddEdge, //最后调用solve struct edge { int v,next; }E[2*maxn]; struct TwoMatch { int head[maxn],eid; bool vis[maxn 阅读全文
posted @ 2016-08-24 08:47 wust_ouyangli 阅读(134) 评论(0) 推荐(0) 编辑