LCS – Longest Common Substring&&Longest Common Substring II(后缀自动机)

LCS2 – Longest Common Substring II

Solution

对于parent树记得上传答案,每一次对于子树取max,对自己的长度取min(即拓扑排序一下更新祖先),然后每次的答案取min,最后扫一遍即可

 

 

0 0 vote
Article Rating
Subscribe
提醒
guest
0 评论
Inline Feedbacks
View all comments