码迷,mamicode.com
首页 >  
搜索关键字:mayors posters    ( 154个结果
Mayor's posters
Mayor's posters Time Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64uSubmit Status Practice POJ 2528Description The citizens of Bytet.....
分类:其他好文   时间:2015-08-01 20:26:23    阅读次数:105
POJ 题目2528 Mayor's posters(线段树+离散化)
Mayor's posters Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 49564   Accepted: 14361 Description The citizens of Bytetown, AB, could not stand that the cand...
分类:其他好文   时间:2015-07-31 14:52:56    阅读次数:118
Mayor's posters---poj2528线段树、离散化
题目链接:http://poj.org/problem?id=2528题意:有n张海报要贴,每张需要用的区间为L到R,后面的可以贴在之前的上面,就是吧之前的挡住,求最后我们能看到几张海报;我们可以倒着处理,因为最后贴的我们是能看到的;如果区间被贴过了result不加,没有贴过就+1并标记一下;由于数...
分类:其他好文   时间:2015-07-31 09:00:50    阅读次数:116
poj 2528 Mayor's posters(线段树区间覆盖、离散化)
Mayor's posters Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 49385   Accepted: 14304 Description The citizens of Bytetown, AB, could not stand that the cand...
分类:其他好文   时间:2015-07-28 13:08:25    阅读次数:121
POJ-2585-Mayor's posters-成段更新+(hash)离散化思想
题目链接:http://poj.org/problem?id=2528 #include #include #include #include #include #include #include #include #include #include #include #define LL long long using namespace std; // 照着题目数组开10005,给报RE,...
分类:其他好文   时间:2015-07-28 00:58:08    阅读次数:120
D - Mayor's posters - 2528(区间覆盖)
题意:贴海报有一面很长的墙,大概有10000000 这么长,现有有一些海报会贴在墙上,当然贴海报的顺序是有先后的,问你当最后一张海报也贴上的时候能不能求出来在这面墙上能看到多少张不同的海报?分析:因为后面贴的海报会把前面贴的覆盖掉,不太容易求出来,但是如果从最后一张倒着贴,只要判断墙上这段区间有没有...
分类:其他好文   时间:2015-07-26 17:12:52    阅读次数:113
poj2528 Mayor's posters(线段树,离散化)
离散化的思想: 对于这样的数据 (3,10000), (9,1000000), (5,100000), (1,1000), (7,1000000) 我们可以将其处理为 (2,7), (5,9), (3,8), (1,6), (4,9) 我们再对离散化之后的数据进行处理就行了。 题目意思: n(n 求出最后还能看见多少张海报。 参考代码:...
分类:其他好文   时间:2015-07-10 19:11:30    阅读次数:139
Poj 2528 Mayor's posters (线段树+离散化)
题目连接: http://poj.org/problem?id=2528题目大意: 有10000000块瓷砖,n张海报需要贴在墙上,每张海报所占的宽度和瓷砖宽度一样,长度是瓷砖长度的整数倍,问按照所给海报顺序向瓷砖上贴海报,最后有几张海报是可见的?解题思路: 因为瓷砖块数和海报张数多,首选线段...
分类:其他好文   时间:2015-07-06 22:59:27    阅读次数:114
poj 2528 Mayor's posters(线段树)
题目链接:http://poj.org/problem?id=2528思路分析:线段树处理区间覆盖问题,也可以看做每次给一段区间染不同的颜色,最后求在整段区间上含有的所有颜色种类数;注意由于区间太大,所以需要离散化;区间更新:对于线段树的每个结点,标记颜色,初始时没有颜色,标记为0;当更新时,使用延...
分类:其他好文   时间:2015-06-11 00:13:33    阅读次数:103
线段树区间更新,区间统计+离散化 POJ 2528 Mayor's posters
题意:有一个很长的板子(10000000长),在上面贴n(n 因为板子有10000000长,直接建树肯定会爆,所以需要离散化处理,对于每张海报,有两个端点值,最后能看到几张海报跟他们的端点值的相对大小有关,跟绝对大小无关,所以就把所有海报的端点离散化处理,总共2n个端点,排序去重,对应p(p 代码: #include #include #include #include...
分类:其他好文   时间:2015-06-02 15:26:52    阅读次数:116
154条   上一页 1 ... 7 8 9 10 11 ... 16 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!