E-COM-NET
首页
在线工具
Layui镜像站
SUI文档
联系我们
推荐频道
Java
PHP
C++
C
C#
Python
Ruby
go语言
Scala
Servlet
Vue
MySQL
NoSQL
Redis
CSS
Oracle
SQL Server
DB2
HBase
Http
HTML5
Spring
Ajax
Jquery
JavaScript
Json
XML
NodeJs
mybatis
Hibernate
算法
设计模式
shell
数据结构
大数据
JS
消息中间件
正则表达式
Tomcat
SQL
Nginx
Shiro
Maven
Linux
2528
POJ
2528
Mayor's posters 【线段树】+【成段更新】+【离散化】
Mayor'spostersTimeLimit: 1000MS MemoryLimit: 65536KTotalSubmissions: 39795 Accepted: 11552DescriptionThecitizensofBytetown,AB,couldnotstandthatthecandidatesinthemayoralelectioncampaignhavebeenplacingt
u012846486
·
2014-07-12 17:00
POJ2528
ACM暑假训练题单
转载请注明出处:優YoU http://blog.csdn.net/lyy289065406/article/details/6642573 最近AC题:
2528
更新时间:2011.09.22
u014141559
·
2014-07-09 10:00
ScrollView+ListView
http://
2528
.iteye.com/blog/1201511http://bbs.csdn.net/topics/390238861
fangzhibin4712
·
2014-06-16 17:00
POJ
2528
Mayor's posters(离散化+区间set线段树)
POJ
2528
Mayor'sposters(离散化+区间set线段树)http://poj.org/problem?
u013480600
·
2014-03-26 19:00
ACM
POJ:
2528
Mayor's posters(未AC)
这是经典的线段树染色问题。用到了区间改值。这个题的难点在于离散化。普通的离散化是不行的。因为在线段树和这个题中数字代表的是一段区间,这样4和5是相邻的。而且普通的离散化每个数都是相邻的。如果有两个区间【1,6】,【10,20】,【1,20】。离散化以后就变成【1,2】【3,4】,【1,4】。很明显两个答案并不一样。这样,如果相邻两个点的差值大于1,则离散化的时候编号多加一。POJ的disscuss
kkkwjx
·
2014-03-21 19:00
poj
2528
Mayor's posters(线段树区间更新+离散化)经典题目,较难。。。
1、http://poj.org/problem?id=25282、题目大意:有一面墙,宽度是10000000,现在要在这面墙上贴海报,每张海报的高度都是墙的高度,但是宽度不同,现在给出各个海报的宽度,按照贴的顺序,后贴的会覆盖先贴的,求都贴完后,能看到几张海报,一张海报只要露着一部分就算是一张可以看到的3、思路:由于题目中wall有10000000byteslong,直接线段树无疑会MLE。所以
sdjzping
·
2014-02-20 16:00
POJ
2528
Mayor's posters
POJ线段树第一题,这一上来就是成段更新加离散化,这训练计划要闹哪样~~~~~题目大意:一面墙上贴海报,问最后能看到多少张海报。因为墙的宽度是单位长度,海报的宽度也是单位长度,所以我们只要来看墙和海报的长度就行。解题思路:利用线段树可以解决。注意因为海报的区间太大,我们得对所有端点离散化,注意如果端点排序之后相邻两点不连续需要在中间再加一个点。下面是代码:#include #include; #i
lin375691011
·
2014-02-20 08:00
线段树
poj
刷题
poj
2528
Mayor's posters(离散化+线段树)
id=
2528
题意:市长竞选,每个市长都往墙上贴海报,海报之间彼此可以覆盖,给出粘贴顺序和每个海报的起点和终点,问最后又多少海报时可见的。
u013081425
·
2014-02-10 19:00
线段树
离散化
HDOJ 1011 Starship Troopers
Java/Others) MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):9096 AcceptedSubmission(s):
2528
ProblemDescriptionYou
u012797220
·
2014-02-05 21:00
HDOJ 1542 Atlantis
Java/Others) MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):5753 AcceptedSubmission(s):
2528
ProblemDescriptionThereareseveralancientGreektextst
u012797220
·
2014-01-26 11:00
线段树
hdoj
扫描线
(Relax 线段树1.2)POJ
2528
Mayor's posters(计算可见线段)
/* *POJ_
2528
.cpp * *Createdon:2013年11月25日 *Author:Administrator */ #include #include #include #definemaxn10010
caihongshijie6
·
2013-11-25 16:00
ScrollView与ListView冲突解决
转自http://
2528
.iteye.com/blog/1201511正常来说,在ScrollView添加一个ListView后在真机上只会显示ListView的一行多一点,我也不理解为什么会这样,后来我把
u010436741
·
2013-11-13 12:00
POJ
2528
(市长的海报)线段树+离散化
****************************author:crazy_石头*datastructure:线段树+离散化*createdtime:2013/11/321:32*Pro:POJ
2528
u012350533
·
2013-11-03 23:00
POJ
2528
:Mayor's posters(线段树区间更新+离散化)
DescriptionThecitizensofBytetown,AB,couldnotstandthatthecandidatesinthemayoralelectioncampaignhavebeenplacingtheirelectoralpostersatallplacesattheirwhim.Thecitycouncilhasfinallydecidedtobuildanelector
libin56842
·
2013-10-31 15:00
线段树
poj
查看端口
netstat-aon|findstr"9092" TCP 127.0.0.1:9092 0.0.0.0:0 LISTENING 25289092端口被进程
2528
rhino
·
2013-10-15 10:00
端口
POJ
2528
Mayor's posters 简单的线段树 + 离散化
在一个被分成 10000000段的墙上贴海报,从第Li段贴到第Ri段。 问最后能看见几张海报。 如果直接建立线段树注定要各种LE。但是只会有1W张海报,所以对其离散化,这样只有2W+个点。 还有一种特殊情况就是原本不会被完全覆盖掉的海报会因离散化而被完全覆盖。 如:3 1 10 1 67 10和31 101 69 10 所以要字啊离散化的的时候注意一下,如果相邻两点相差>1,则
u012161037
·
2013-09-29 11:00
集团新员工培训
××集团新员工培训-201309期 日期时间课程讲师备注培训地点(星期一)第一天8:40--9:00组建培训班之团队××(班主任)组队,队名、队旗、司歌
2528
会议室9:00--10:00培训学员相互介绍
MINEZHANGHAO
·
2013-09-28 08:00
工作
团队
培训
企业文化
POJ
2528
Mayor's posters
区间线段树水题,离散化怒A==我觉得最后算答案哪里应该不用再单独算的==好吧,虽然A了,但是我的算法写错了==3 110 13 610 这组数据就不对。应该是把每个数据的+1还有-1也都离散化一下,在做就对了,可是据说这样反而会过不了==#include #include #include #include #include #include #include #include #include
huangshenno1
·
2013-09-26 15:00
POJ
2528
离散化+线段树染色
九野的博客,转载请注明出处:http://blog.csdn.net/acmmmm/article/details/12027811题意:T个测试数据n个操作i.thline[u,v]表示给区间[u,v]染上i色 问最后有几种颜色区间范围很大,所以先离散化注意区间更新的操作 #include #include #include #include #include #include #d
qq574857122
·
2013-09-25 20:00
POJ
2528
离散化+线段树染色
九野的博客,转载请注明出处:http://blog.csdn.net/acmmmm/article/details/12027811题意:T个测试数据n个操作i.thline[u,v]表示给区间[u,v]染上i色 问最后有几种颜色区间范围很大,所以先离散化注意区间更新的操作 #include #include #include #include #include #include #d
qq574857122
·
2013-09-25 20:00
POJ
2528
Mayor'spostersTimeLimit: 1000MS MemoryLimit: 65536KTotalSubmissions: 35392 Accepted: 10278DescriptionThecitizensofBytetown,AB,couldnotstandthatthecandidatesinthemayoralelectioncampaignhavebeenplacingt
zkzxmzk
·
2013-09-10 13:00
线段树
ACM
poj
2528
Mayor's posters 线段树+离散化
题意:有一个10000000长的墙,现在要到墙上贴一些海报,因为贴的时候可以覆盖所以问最后你可以看见多少张海报(不要求完整的海报,有一个部分没被覆盖那么就认为可以看见这个海报)其中海报最多10000张海报有2个数据它贴在墙上的左端点值l和右端点值r其中1 #include #include #include usingnamespacestd; #definelsonl,m,rtse;//set可
u011401504
·
2013-09-01 16:00
线段树
post
poj
离散化
2528
Mayors
poj
2528
线段树 区间更新+染色+离散化
这题是我做区间更新离散化的第一题呀,对离散化的应用有了一定了了解,然后染色是区间更新另一种应用,最主要的是对col数组的处理。先介绍最普通的离散化:把可能出现的所有点排序,然后将该点再数组中的位置作为该点新的值。用到stl包括:sort(a,a+n),low_bound(a,a+n,a[i]),unique(a,a+k)注意一下就是1.先排序,在去重。2.要及时更新数组的大小,k=low_boun
qq415200973
·
2013-08-29 14:00
POJ
2528
Mayor posters 线段树 成段更新
#include #include #include usingnamespacestd; #definelsonl,m,rt>1 #definemaxn10004 intcol[maxn>1; if(a[mm]==key)returnmm; if(a[mm]>key)r=mm-1; elsel=mm+1; } return-1; } intmain() { inti,j,cas; scanf("
c3568
·
2013-08-29 10:00
poj -
2528
- Mayor's posters 线段树+离散化
转载自:http://blog.csdn.net/just_water/article/details/7880379 http://blog.csdn.net/scnu_jiechao/article/details/8576202题意:一条固定高度与宽度的长长的(10000000)展栏,n(1>离散化线段树来做,却不想离散化写了大半天…… 原来的:1 2 3 4 6 7
xiaozhuaixifu
·
2013-08-26 22:00
线段树
poj
2528
离散化+线段树 hdu 1698 线段树 线段树题目类型一:染色计数 外加离散化
pid=1698先做这个水题,在做poj
2528
,当然poj
2528
也很水一、建树把hook作为线段建树,近乎直接套线段树的模板。二、计算结果voidcal(i
u011026968
·
2013-08-25 20:00
POJ
2528
Mayor's posters
一个线段树关于区间更新的题目。贴海报最后求能够看见的海报的数目,按照贴的顺序依次对线段树的[l,r]区间进行更新,注意使用延迟标记。由于数据较大,所以必须先离散化处理,即取海报的区间的两端的值存储下来,然后排序映射到1,2,3,......n然后对每张海报按照区间端点对应的映射号更新即可。1#include 2#include 3#include 4#defineN11111 5#defi
·
2013-08-06 23:00
post
poj
2528
Mayor's posters(线段树+离散化+区间统计)
Mayor'spostersTimeLimit: 1000MS MemoryLimit: 65536KTotalSubmissions: 34477 Accepted: 9985DescriptionThecitizensofBytetown,AB,couldnotstandthatthecandidatesinthemayoralelectioncampaignhavebeenplacingth
y5885922
·
2013-08-06 08:00
c
算法
ACM
POJ
2528
& UVA 10587(线段树+离散+区间修改)
题意:在墙上贴海报,海报可以互相覆盖,问最后可以看见几张海报。思路:线段树直接做会TLE+MLE,因此需要离散。所谓离散就是将区段进行压缩,但是又不改变区间的位置关系。方法就是将区段的端点值去掉相同的进行排序,举个例子:给定4个区间[2,4][3,6][8,10][6,9],覆盖关系就是后者覆盖前者,每个区间染色依次为1234。现在我们抽取这4个区间的8个端点,243681069然后删除相同的端点
blzorro
·
2013-08-05 16:00
哈希
线段树
离散
区间修改
线段树 poj
2528
离散化处理
Mayor'spostersTimeLimit: 1000MS MemoryLimit: 65536KTotalSubmissions: 34272 Accepted: 9932DescriptionThecitizensofBytetown,AB,couldnotstandthatthecandidatesinthemayoralelectioncampaignhavebeenplacingth
u010092734
·
2013-08-02 09:00
12 个强大的 Chrome 插件扩展
原文链接:http://www.admin10000.com/document/
2528
.htmlChrome功能强大,也得益于其拥有丰富的扩展资源库。
a125138
·
2013-08-01 08:00
浏览器
chrome
插件
扩展
北大ACM试题分类
转载请注明出处:優YoU http://blog.csdn.net/lyy289065406/article/details/6642573 最近AC题:
2528
更新时间:2011.09.22
ymrfzr
·
2013-07-31 14:00
北大
POJ
2528
Mayor's posters
Mayor'spostersDescriptionThecitizensofBytetown,AB,couldnotstandthatthecandidatesinthemayoralelectioncampaignhavebeenplacingtheirelectoralpostersatallplacesattheirwhim.Thecitycouncilhasfinallydecidedto
Magic____
·
2013-07-29 16:00
poj
2528
Mayor'spostersTimeLimit: 1000MS MemoryLimit: 65536KTotalSubmissions: 33753 Accepted: 9788DescriptionThecitizensofBytetown,AB,couldnotstandthatthecandidatesinthemayoralelectioncampaignhavebeenplacingth
cugbbaoge
·
2013-07-22 22:00
poj
Baoge
线段树题目集
//zoj1610线段覆盖//poj2777线段覆盖//poj
2528
需要离散化,建树不同,需要处理不同->注意这组数据311013610 theansis3.
u010138811
·
2013-07-16 09:00
线段树
poj
2528
(线段树)
在此申明,本题的代码是暑期学习时北大老师给的,我只是谈谈自己的理解。首先本题的海报张数1 #include #include usingnamespacestd; intn; //海报数据结构structCPost { intL,R; }; CPostposters[10100]; intx[20200];//海报的端点瓷砖编号 inthash[10000010];//hash[i]表示瓷砖i所处
xj2419174554
·
2013-07-13 15:00
数据结构
poj
2528
Mayor's posters(线段树区点)
id=
2528
题目大意: 给出一面宽度未知的海报墙 再给出N张海报,每张海报会贴在墙的区间[a,b],高度与墙相等 所有的海报按照顺序贴完
qq7366020
·
2013-06-15 23:00
线段树
poj
poj
2528
解题报告 Mayor's posters
Mayor'spostersTimeLimit: 1000MS MemoryLimit: 65536KTotalSubmissions: 33152 Accepted: 9641DescriptionThecitizensofBytetown,AB,couldnotstandthatthecandidatesinthemayoralelectioncampaignhavebeenplacingth
u010422038
·
2013-06-12 10:00
Mayors
poj2528解题报告
Poj
2528
Mayor's posters
id=
2528
线段树成段更新。这题关于线段树这个数据结构倒是没什么说的,关键是题意的理解和思路的整理。查询的时候,实际上是二分遍历整个查询区间,每一个单位用vis来标记是否访问过。
niuox
·
2013-06-10 23:00
线段树
离散化
poj
2528
Mayor's posters(线段树+离散化+坑坑坑)
->题目请戳这里 #include #include #include #include usingnamespacestd; constintN=20005; boolflag[N]; intn; structnd { intl,r; }edge[N]; intlcm[N+N+N]; structnode { intlazy,val; }tree[Npoint;//用map竟然TLE,LE,E.
ophunter
·
2013-06-08 17:00
数据结构
线段树(需离散化)之poj-
2528
#include #include #include #include #include #include usingnamespacestd; #definelz2*u,l,mid #definerz2*u+1,mid+1,r constintmaxn=20005; intflag[4*maxn]; intA[maxn],B[2*maxn]; intvisit[2*maxn]; intans=
xianglunxi
·
2013-06-07 18:00
线段树
ACM
离散化
poj
2528
线段树成段更新+离散化处理 鄙人 陷入沉思。。。。。
前天的多校联赛被虐成渣渣了,最后发现有一网络流,泪奔了,看了rank Most1A,=。。=一怒之下,昨天看了一天网络流,感觉好不错,感觉没以前那么难了,可以搞。。。。。。今天就把剩余的线段树搞搞吧!这个题,看了别人的解题报告:思路:我们对区间进行更新的时候,需要离散化处理一下。简单的思路就是,把比较大的区间,离散化之后对应一个小区间,然后对小区间进行成段更新,但是有一个地方需要注意(看别人的博客
wahaha1_
·
2013-05-16 14:00
Poj
2528
Mayor's posters 线段树 离散化 成段更新
Mayor'spostersTimeLimit: 1000MS MemoryLimit: 65536KTotalSubmissions: 32605 Accepted: 9469DescriptionThecitizensofBytetown,AB,couldnotstandthatthecandidatesinthemayoralelectioncampaignhavebeenplacingth
cyendra
·
2013-05-13 15:00
题解
北大ACM试题分类
转载请注明出处:優YoUhttp://blog.csdn.net/lyy289065406/article/details/6642573最近AC题:
2528
更新时间:2011.09.22已AC题数:146
发奋屠强
·
2013-05-07 15:03
北大ACM试题分类
转载请注明出处:優YoUhttp://blog.csdn.net/lyy289065406/article/details/6642573 最近AC题:
2528
更新时间:2011.09.22
Hhaile
·
2013-05-07 15:00
poj
2528
之线段树+离散化
#include #include #include #include #include #include #include #include #include #defineINF99999999 usingnamespacestd; //类似于在一个块上涂颜色,问最后能看到几种颜色 constintMAX=10000+10; inthash[MAX*4];//离散化后的数组,所谓离散化简单理
xingyeyongheng
·
2013-04-28 19:00
Mayor's posters POJ
2528
ACM算法设计
id=
2528
大致题意:有一面墙,被等分为1千万份,一份的宽度为一个单位宽度。
iFinVer
·
2013-04-26 11:00
POJ
2528
Mayor's posters(线段树+离散化)
参照HH牛的模板敲的。RE了3次后发现X数组开小了,坑死爹了。HH牛的博客:http://www.notonlysuccess.com/index.php/segment-tree-complete/#include #include #include #definelsonl,m,rt>1 usingnamespacestd; constintmaxn=10000+5; boolhash[max
z690933166
·
2013-04-03 21:00
【线段树】poj
2528
Mayor's posters
需进行离散化,从后往前进行覆盖扫描。#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #i
lwfcgz
·
2013-03-22 19:00
POJ
2528
Mayor's posters
#include #include #include #include #include #include #include usingnamespacestd; constintmaxn=111111; #definelco*2 #definerco*2+1 intcolor[maxn=R) { color[o]=v; return; } pushdown(o); intM=L+(R-L)
Wall_F
·
2013-03-14 11:00
上一页
2
3
4
5
6
7
8
9
下一页
按字母分类:
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
其他