线段数
G-Howe
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Just a Hook
In the game of DotA, Pudge’s meat hook is actually the most horrible thing for most of the heroes. The hook is made up of several consecutive metallic sticks which are of the same length.Now Pudg...原创 2018-08-01 11:03:10 · 220 阅读 · 0 评论 -
Color the ball
树状数组:改段求点N个气球排成一排,从左到右依次编号为1,2,3....N.每次给定2个整数a b(a <= b),lele便为骑上他的“小飞鸽"牌电动车从气球a开始到气球b依次给每个气球涂一次颜色。但是N次以后lele已经忘记了第I个气球已经涂过几次颜色了,你能帮他算出每个气球被涂过几次颜色吗?Input每个测试实例第一行为一个整数N,(N <= 100000).接下来的...原创 2018-08-01 11:04:38 · 143 阅读 · 0 评论 -
线段树+扫描线
转载自 https://blog.youkuaiyun.com/xianpingping/article/details/83032798扫描线:下面是来自soar转载的一篇博客。横扫这篇博客解决了我对算区间长度时的不理解。实际上这个线段树的叶子节点保存的是这个点x坐标到下一个x坐标(排序后的)的区间长度。题意:二维平面有n个平行于坐标轴的矩形,现在要求出这些矩形的总面积. 重叠部分...转载 2019-08-06 08:51:44 · 346 阅读 · 0 评论
分享