码迷,mamicode.com
首页 >  
搜索关键字:线段树+离散化    ( 150个结果
Mayor's posters(线段树 + 离散化)
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 coun...
分类:其他好文   时间:2014-08-14 16:46:38    阅读次数:291
hdu1828 Picture(线段树+离散化+扫描线)两种方法
C - Picture Time Limit:2000MS     Memory Limit:10000KB     64bit IO Format:%I64d & %I64u Submit Status Description A number of rectangular posters, photographs and other pictures of ...
分类:其他好文   时间:2014-08-12 22:08:14    阅读次数:460
POJ 2528 Mayor's posters(线段树+离散化)
题目链接:Mayor's posters 题意:按顺序往墙上贴海报,可以重叠,问最后可以看到多少海报。(被覆盖的海报是看不到的) 注意: 因为数据比较大,所以不离散化,肯定爆内存。 还有就是,不能只是单纯的离散化,还要处理好点的边界 举个例子 4 2  10. 2  8 3  6 6  8 8  10 离散化后 2 3 6 8 10 1 2 3 4 5 覆盖掉了  ...
分类:其他好文   时间:2014-08-12 19:05:54    阅读次数:228
hdu1255--覆盖的面积(线段树+离散化+扫描线)
E - 覆盖的面积 Time Limit:5000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64u Submit Status Description 给定平面上若干矩形,求出被这些矩形覆盖过至少两次的区域的面积.    Input 输入数据的第一行是一个...
分类:其他好文   时间:2014-08-12 19:01:42    阅读次数:290
POJ 2528 Mayor's posters.
~~~~ 一直MLE,才发现要写离散化操作。其他就是线段树的成段更新(每次用不同标记去更新区间),最后统计下有多少种标记就OK了。 题目链接:http://poj.org/problem?id=2528 大牛写的很详细,请戳:http://blog.csdn.net/metalseed/article/details/8041334 ~~~~ #include #include #inc...
分类:其他好文   时间:2014-08-11 21:34:43    阅读次数:268
poj3277--City Horizon(线段树+离散化+扫描线)
City Horizon Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 16206   Accepted: 4414 Description Farmer John has taken his cows on a trip to the city! As the ...
分类:其他好文   时间:2014-08-11 21:19:42    阅读次数:339
poj1151-- Atlantis(线段树+离散化+扫描线)
Atlantis Time Limit:1000MS     Memory Limit:10000KB     64bit IO Format:%I64d & %I64u Submit Status   Description There are several ancient Greek texts that contain descriptions of ...
分类:其他好文   时间:2014-08-11 17:51:13    阅读次数:261
POJ训练计划2299_Ultra-QuickSort(线段树/单点更新)
解题报告 题意: 求逆序数。 思路: 线段树离散化处理。 #include #include #include #include #define LL long long using namespace std; LL sum[2001000],num[501000],_hash[501000]; void push_up(int rt) { sum[rt]=sum[rt...
分类:其他好文   时间:2014-08-11 00:22:01    阅读次数:255
POJ 2299 Ultra-QuickSort(线段树+离散化)
题目地址:POJ 2299 这题曾经用归并排序做过,线段树加上离散化也可以做。一般线段树的话会超时。 这题的数字最大到10^10次方,显然太大,但是可以利用下标,下标总共只有50w。可以从数字大的开始向树上加点,然后统计下标比它小即在它左边的数的个数。因为每加一个数的时候,比该数大的数已经加完了,这时候坐标在它左边的就是一对逆序数。 但是该题还有一个问题,就是数字重复的问题。这时候可以在排序...
分类:其他好文   时间:2014-08-10 15:43:20    阅读次数:210
HDU 1255 覆盖的面积 (扫描线 线段树 离散化)
题目链接题意:中文题意。分析:纯手敲,与上一道题目很相似,但是刚开始我以为只是把cnt》=0改成cnt>=2就行了,、但是后来发现当当前加入的线段的范围之前 还有线段的时候就不行了,因为虽然现在都不等于2,但是之前的那个线段加上现在的已经覆盖2次了。 1 #include 2 #include...
分类:其他好文   时间:2014-08-09 18:28:29    阅读次数:275
150条   上一页 1 ... 12 13 14 15 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!