He Kai's blog

CDQ分治

BZOJ3963: [WF2011]MachineWorks

[latexpage] Time Limit: 30 Sec  Memory Limit: 256 MB Description 你是任意性复杂机器公司(Arbitrarily Complex Machines, ACM…

2017-11-28 3 Comments 3,348 Views 0 Times 阅读全文
CDQ分治

BZOJ4991: [Usaco2017 Feb]Why Did the Cow Cross the Road III

Time Limit: 10 Sec  Memory Limit: 128 MB Description Farmer John is continuing to ponder the issue of cows cro…

2017-08-26 1 Comments 2,269 Views 0 Times 阅读全文
CDQ分治

CDQ分治详解(BZOJ3262: 陌上花开)

我们考虑一个三维偏序问题: 即(i,j)满足ai<aj bi<bj ci<cj。 最暴力的做法是n^2的。 我们可以将第一维排序,然后用二维树状数组来记录bi,ci,这样可以做到n*log(n)的时间复…

2017-08-26 1 Comments 2,571 Views 0 Times 阅读全文
登录

Copyright 2017 He Kai's blog. All Rights Reserved.
Theme Kratos made by Vtrois