![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
线段树
脑回路清奇的少年
这个作者很懒,什么都没留下…
展开
-
HDU-1556 Color the ball(线段树-区间染色)
N个气球排成一排,从左到右依次编号为1,2,3....N.每次给定2个整数a b(a <= b),lele便为骑上他的“小飞鸽"牌电动车从气球a开始到气球b依次给每个气球涂一次颜色。但是N次以后lele已经忘记了第I个气球已经涂过几次颜色了,你能帮他算出每个气球被涂过几次颜色吗?Input每个测试实例第一行为一个整数N,(N <= 100000).接下来的N行,每行包括2个整数a b(...原创 2018-04-11 00:25:57 · 492 阅读 · 0 评论 -
POJ 1777 Picture(线段树+离散化+扫描线)
A number of rectangular posters, photographs and other pictures of the same shape are pasted on a wall. Their sides are all vertical or horizontal. Each rectangle can be partially or totally covered b...原创 2018-04-13 00:19:41 · 244 阅读 · 0 评论