摘要:
题意 给一个循环串,从某个点开始会得到一个字典序最小的串,从某个点开始会得到一个字典序最大的串,求这两个点的下标,以及其出现的次数。 "传送门" 思路 最小/大表示法求下标,kmp求出现次数。 "最小/大表示法" Code cpp include include using namespace st 阅读全文
摘要:
题意 给定n个模式串,求目标串中出现了多少个模式串。 "传送门" 思路 AC自动机模版题。 Code cpp include using namespace std; const int maxn = 1e6+10; struct Ac { int tr[maxn][26], fail[maxn], 阅读全文
摘要:
链接:https://ac.nowcoder.com/acm/contest/888/A来源:牛客网 题目描述 Gromah and LZR entered the great tomb, the first thing they see is a matrix of size n×mn\times 阅读全文