摘要: 因为重合部分越短,每次增加的长度就越长,所以如果有多种连接方式,就选择重合部分最短的那一类。 因为要多次判断重合部分的长度,所以可以在dfs之前先预处理打表一遍所有字符串相互的重合长度。 #include <iostream> #include <algorithm> #include <stdli 阅读全文
posted @ 2023-11-06 17:26 Gold_stein 阅读(3) 评论(0) 推荐(0) 编辑