摘要:
题目链接 "BZOJ2795" "BZOJ2890" "BZOJ3647" 题解 三倍经验! 我们要快速求区间最小循环节 我们知道循环节有如下性质: ①当$L$为循环节长度,那么$s[l...r L] = s[l + L...r]$且$L | (r l + 1)$ ②如果$L$为循环节,那么$L x 阅读全文
摘要:
题目链接 "BZOJ2823" 题解 "最小圆覆盖" 模板 都懒得再写一次 C++ include include include include include include include define LL long long int define Redge(u) for (int k = 阅读全文
摘要:
题目链接 "BZOJ2924" 题解 题面有误。。是$45°$ 如果两个点间连线与$x$轴夹角在$45°$以内,那么它们之间连边 求最小路径覆盖 = 最长反链 由于$45°$比较难搞,我们利用复数翻转一下,逆时针旋转$45°$ 这样就求一条从左上到右下的最长链 我们将所有点按$x$排序,令$f[i] 阅读全文
摘要:
题目链接 "洛谷P3759" 题解 树状数组套主席树板题 C++ include include include include include include define Redge(u) for (int k = h[u],to; k; k = ed[k].nxt) define REP(i, 阅读全文