摘要:
题目链接 https://www.luogu.com.cn/problem/P3975 题意 给你一个仅由小写字母构成的字符串$s$,输出它的第$k$小子串($t=0$时表示不同位置的相同子串算作一个,$t=1$时表示不同位置的相同子串算作多个) 思路 构建出SAM之后,求出$sum[i]$,表示有 阅读全文
摘要:
前言 线段树合并:https://www.luogu.com.cn/blog/styx-ferryman/xian-duan-shu-ge-bing-zong-ru-men-dao-fang-qi 题目链接 https://www.luogu.com.cn/problem/P3605 题意 给你一颗 阅读全文