
cdq
hyacinthhome
这个作者很懒,什么都没留下…
展开
-
uva 11990 ``Dynamic'' Inversion CDQ
嗯,cdq真实非常强大。。 时间,下标,对应的值 这三个变量刚好形成sanw三维偏序,本来是删除,可以看成倒着删除,然后比如有t0,x0,y0, 那么对于逆序对的改变就要去找(t<t0,x<x0,y>y0) 和(t<t0,x>x0,y<y0)的点的个数。 Left: Right: Left的时间一定小于Right...原创 2018-08-06 22:35:27 · 364 阅读 · 0 评论 -
gym101485G-Guessing Camels(cdq分治)(2015-2016 Northwestern European Regional Contest (NWERC 2015))
三维点每个点参数a,b,c 找有多少对(node1,node2)点是 node1.a<node2.a&&node1.b<node2.b&&node1.c<node2.c 三维偏序关系,cdq裸题 #include <iostream> #include <cstdio> #include <algorithm&g...原创 2018-10-20 00:32:29 · 266 阅读 · 0 评论