摘要: #include<cstdio> #include<algorithm> #include<cstring> using namespace std; const int maxn=100010; int t[maxn][2],f[maxn],s[maxn],lmax[maxn],lmin[maxn 阅读全文
posted @ 2017-05-31 21:59 ONION_CYC 阅读(94) 评论(0) 推荐(0) 编辑
摘要: 【算法】区间DP 【题解】 参考写法:BZOJ 3971 Матрёшка 解题报告 第二个DP可以预处理mex优化到O(nM+n2),不过我懒…… 第一个DP有另一种写法:不预处理,在一个n2取出来的的区间中,枚举决策点从左到右时,保留左最小值的可保留数不严格单调递增,保留右最小值的可保留数不严格 阅读全文
posted @ 2017-05-31 20:15 ONION_CYC 阅读(400) 评论(0) 推荐(0) 编辑