
思维 - 分治、cdq分治
文章平均质量分 56
TaoSama
The ACM road begins.
展开
-
BZOJ 3262 陌上花开、HDU 5618 Jam's problem again(三维偏序、cdq分治 + BIT)
题意: 给定N≤105个三元组(xi,yi,zi),xi,yi,zi≤105给定N\le10^5个三元组(x_i,y_i,z_i), x_i,y_i,z_i\le 10^5 定义偏序关系(xi,yi,zi)≤(xj,yj,zj)满足xi≤xj,yi≤yj,zi≤zj定义偏序关系(x_i,y_i,z_i)\le(x_j,y_j,z_j)满足x_i\le x_j, y_i\le y_j, z_原创 2016-02-02 17:34:46 · 1770 阅读 · 0 评论 -
51nod 1376 最长递增子序列的数量(dp、CDQ分治 | BIT)
题意: N≤5×104的序列,0≤Ai≤109,求LIS的数量N\le5\times10^4的序列, 0\le A_i\le 10^9, 求LIS的数量 分析: f[i]:以第i个数结尾的LIS的长度,和该长度的LIS数量f[i]:以第i个数结尾的LIS的长度, 和 该长度的LIS数量 转移的话,显然f[i].first=max{f[j].first}+1,j<i且a[j]<a[i]转原创 2016-02-16 22:25:23 · 1779 阅读 · 2 评论 -
分治、CDQ分治小结(need to be updated)
分治、CDQ分治小结 A Summary for Divide and Conquer0. Anouncement 本文部分图片以及部分内容来自互联网,内容过多就不一一注明出处了,冒犯之处还请海涵。 Some of the pictures and the content of the text come from the Internet. Due to plenty of t原创 2016-02-02 20:09:15 · 3835 阅读 · 0 评论