摘要: for (int i = 1; i <= n; ++i) { cout << dist[i] << " \n"[i == n]; } 阅读全文
posted @ 2025-03-09 23:34 lyrrr 阅读(12) 评论(0) 推荐(0)
摘要: 朴素AC自动机拓扑排序优化板子 求匹配次数: #include<bits/stdc++.h> using namespace std; const int N = 2e6 + 10; int n, fail[N], tr[N][26], tot, du[N], tans[N], id[N], ans 阅读全文
posted @ 2025-03-09 19:41 lyrrr 阅读(23) 评论(0) 推荐(0)