会员
周边
新闻
博问
闪存
众包
赞助商
YouClaw
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
uid001
首页
管理
随笔分类 -
数据结构-CDQ分治
三维数点的CDQ分治板子
摘要:int n, k, tot; struct _ {int x,r,f;} a[N]; struct __ { int type; ll x,y; bool operator < (const __ & rhs) const { if (x!=rhs.x) return x<rhs.x; if (y!=rhs.y) return y<rhs.y; return type<rhs....
阅读全文
posted @
2019-05-07 21:20
uid001
Radio stations CodeForces - 762E (cdq分治)
摘要:大意: 给定$n$个三元组$(x,r,f)$, 求所有对$(i,j)$, 满足$i<j, |f_i-f_j|\le k, min(r_i,r_j)\ge |x_i-x_j|$ 按$r$降序排, 去掉$min$, 然后就是个裸的三维数点问题, 可以用$CDQ$分治解决.
阅读全文
posted @
2019-05-07 20:42
uid001