本文出自Svitter的blog
——踏踏实实的做事儿啊!
POJ2528
题意
The citizens of Bytetown, AB, could not stand that the candidates in the mayoral election campaign have been placing their electoral posters at all place...
分类:
其他好文 时间:
2014-08-07 19:16:20
阅读次数:
270
Mayor's postersTime Limit:1000MS Memory Limit:65536KDescriptionThe citizens of Bytetown, AB, could not stand that the candidates in the mayoral elect....
分类:
其他好文 时间:
2014-08-05 21:59:50
阅读次数:
349
题目大意:往一面墙上贴与墙等高的海报,n次贴完后,求可以看见的海报总数(看见一部分也算)思路:明显的区间维护,用线段树,不过裸的线段树超时超空间,可以把坐标离散,得到不超过200000个有效点,每个点都表示一个小区间(a[i]~a[i+1]这一段),然后就可以轻松地解决了。不过题目有个坑,给定的右坐...
分类:
其他好文 时间:
2014-08-04 20:47:37
阅读次数:
369
Description
The citizens of Bytetown, AB, could not stand that the candidates in the mayoral election campaign have been placing their electoral posters at all places at their whim. The city counci...
分类:
其他好文 时间:
2014-08-03 15:17:15
阅读次数:
301
题目的感悟:/*这道题的想法是先开一个数组,先构造一颗线段树,然后每次都进行一次更新最后我们在访问的时候只要看最外层还剩下那些数字,对他们进行统计然后将结果返回即可。这道题的难度本来是不大的,思路非常的清晰,但是在处理的过程中还是会有很大的问题因为数据量过大,所以处理后很有可能会超时对此我感到很不公...
分类:
其他好文 时间:
2014-08-01 19:09:12
阅读次数:
210
题意:在一块木板上贴海报,每次贴海报给一个横坐标范围,在这个范围内贴,按照它给的顺序,海报可以被覆盖,问最后还能看见几张海报。
都说这是线段树入门题。。。。结果我还是出翔了,不是在线段树部分,是在离散化部分。
我之前看到一个很飘逸的离散化写法,可惜找不到了,这回是这么写的:去重之后再把每个点的后一个值也加入离散化后的数组(如果这个值之前没有的话),这样避免了漏掉中间没被覆盖的情况。
...
分类:
其他好文 时间:
2014-07-31 13:30:06
阅读次数:
164
posters时间限制:1000ms | 内存限制:65535KB难度:6描述The citizens of Bytetown, AB, could not stand that the candidates in the mayoral election campaign have been pl...
分类:
其他好文 时间:
2014-07-28 23:46:54
阅读次数:
451
题意:
求矩形面积的并 每个矩形里面有个小的矩形被挖空
思路:
经典的线段树扫描线 我竟然坑了3个小时没写出来…真是鄙视自己!!
学过扫描线的都会有思路 这里提出一个错误想法…(就是我的…)
你要是这样给线赋权值就大错特错了 因为会发现线段树的结构使得操作变得很麻烦
当你想更新某段区间的时候 并不知道准确的down到哪里 也不知道更新完了up要如何合并区间
当然像我一样一开始都更新到叶子节点是必须TLE的… TAT
正确思路是这样的
划分出4个矩形再求 为什么这样就对了呢? 因为不...
分类:
其他好文 时间:
2014-07-19 23:32:09
阅读次数:
313
Mayor's posters
Time Limit: 1000MS
Memory Limit: 65536K
Total Submissions: 39795
Accepted: 11552
Description
The citizens of Bytetown, AB, could not stand that the...
分类:
其他好文 时间:
2014-07-13 14:02:48
阅读次数:
266
Problem Description
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...
分类:
其他好文 时间:
2014-07-08 11:10:23
阅读次数:
164