摘要:
先拓扑排序搞出合法的, 然后就是最大权闭合图模型了....---------------------------------------------------------------------#include#include#includeusing namespace std;#define... 阅读全文
摘要:
排序搞掉一维, 然后就用LCT维护加边MST. O(NlogN)--------------------------------------------------------------------------------------#include#include#include#include... 阅读全文
摘要:
建AC自动机后, dp(x, y, s)表示当前长度为x, 在结点y, 包括的串的状态为s的方案数, 转移就在自动机上走就行了. 对于输出方案, 必定是由给出的串组成(因为#include#include#includeusing namespace std;typedef long long ll... 阅读全文