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
1698
【hdu】
1698
just a hook 中文题意&题解
JustaHookTimeLimit:4000/2000MS(Java/Others)MemoryLimit:32768/32768K(Java/Others)ProblemDescriptionInthegameofDotA,Pudge’smeathookisactuallythemosthorriblethingformostoftheheroes.Thehookismadeupofsever
WilliamCode
·
2016-04-12 09:00
C++
poj
NOI
HDU
1698
区间的修改(基础)
JustaHookTimeLimit:4000/2000MS(Java/Others) MemoryLimit:32768/32768K(Java/Others)TotalSubmission(s):25630 AcceptedSubmission(s):12798ProblemDescriptionInthegameofDotA,Pudge’smeathookisactuallyth
zcj5027
·
2016-04-08 22:00
Just a Hook
pid=
1698
JustaHookTimeLimit:4000/2000MS(Java/Others) MemoryLimit:32768/32768K(Java/Others)TotalSubmission
glu_cky
·
2016-04-08 13:00
hdu 【
1698
】 Just a Hook
JustaHookTimeLimit:4000/2000MS(Java/Others) MemoryLimit:32768/32768K(Java/Others)TotalSubmission(s):25593 AcceptedSubmission(s):12778ProblemDescriptionInthegameofDotA,Pudge’smeathookisactuallyth
chen_ze_hua
·
2016-04-06 20:00
HDU
1698
Just a Hook (线段树,区间更新)
HDU1689模板题。#include #include #include #include #include usingnamespacestd; intN,Q; constintMAXN=100100; structnode{ intl,r,m,val,book; }; nodeT[4*MAXN]; voidbuild(intrt,intbegin,intend){ T[rt].l=begin
Strokess
·
2016-04-06 10:00
HDU
1698
Just a Hook(线段树的区间更新)
InthegameofDotA,Pudge’smeathookisactuallythemosthorriblethingformostoftheheroes.Thehookismadeupofseveralconsecutivemetallicstickswhichareofthesamelength.NowPudgewantstodosomeoperationsonthehook.Letusn
qq_32866009
·
2016-04-03 22:00
HDU
Genymotion添加模拟器时报“Unable to create virtual device,Server returned HTTP status code 0”
wangli\AppData\Local\Genymobile搜索[downloadFile]找到这个一串URLhttps://cloud.genymotion.com/vmtemplate/cde39d84-
1698
lee576
·
2016-04-02 00:00
hdu
1698
Just a Hook 线段树延迟标记区间更新 求加权区间总和
JustaHookTimeLimit:4000/2000MS(Java/Others) MemoryLimit:32768/32768K(Java/Others)TotalSubmission(s):25444 AcceptedSubmission(s):12707ProblemDescriptionInthegameofDotA,Pudge’smeathookisactuallyth
EventQueue
·
2016-03-30 21:00
线段树
ACM
线段树 区间更新 HDU
1698
JustaHookTimeLimit:4000/2000MS(Java/Others) MemoryLimit:32768/32768K(Java/Others)TotalSubmission(s):9758 AcceptedSubmission(s):4776ProblemDescriptionInthegameofDotA,Pudge’smeathookisactuallythem
Alan_Lin
·
2016-03-26 21:00
JavaBean中的get/set 的命名规范
JavaBean中的get/set的命名规范2012年01月01日 ⁄综合 ⁄共
1698
字⁄字号 小 中 大 ⁄ 评论关闭最近的struts项目中遇到了这样的问题:我的action中全局变量明明有getset
evilcry2012
·
2016-03-25 14:00
国内外三个不同领域巨头分享的Redis实战经验及使用场景(二)
Pinterest:Reids维护上百亿的相关性Pinterest已经成为硅谷最疯故事之一,在2012年,他们基于PC的业务增加1047%,移动端采用增加
1698
%, 该年3月其独立访问数量更飙升至
zyt_1978
·
2016-03-21 08:00
POJ
1698
图论之网络流
点击打开链接题意:T组数据,每组第一个为n,表示有n演出,接下来的九个数前七个表示周一到周日,如果为1,可以在这天演出,后两个数代表演出多少天才算完成任务和在多少周之前必须演出结束,问这个人可以完成这些要求吗思路:用最大流解决,建立一个源点和一个汇点,将源点与每一个节目相连,流量为这个节目需要的天数,然后将这个节目与每星期可以演出的日子连一条流量为1的边,最后将所有可以演出的日子与汇点连一条流量为
Dan__ge
·
2016-03-20 13:42
图论
网络流
线段树
POJ
1698
图论之网络流
点击打开链接题意:T组数据,每组第一个为n,表示有n演出,接下来的九个数前七个表示周一到周日,如果为1,可以在这天演出,后两个数代表演出多少天才算完成任务和在多少周之前必须演出结束,问这个人可以完成这些要求吗思路:用最大流解决,建立一个源点和一个汇点,将源点与每一个节目相连,流量为这个节目需要的天数,然后将这个节目与每星期可以演出的日子连一条流量为1的边,最后将所有可以演出的日子与汇点连一条流量为
Dan__ge
·
2016-03-20 13:00
网络
ACM
poj
图论
最大流
POJ
1698
图论之网络流
点击打开链接题意:T组数据,每组第一个为n,表示有n演出,接下来的九个数前七个表示周一到周日,如果为1,可以在这天演出,后两个数代表演出多少天才算完成任务和在多少周之前必须演出结束,问这个人可以完成这些要求吗思路:用最大流解决,建立一个源点和一个汇点,将源点与每一个节目相连,流量为这个节目需要的天数,然后将这个节目与每星期可以演出的日子连一条流量为1的边,最后将所有可以演出的日子与汇点连一条流量为
Dan__ge
·
2016-03-20 13:00
网络
ACM
poj
图论
最大流
HDU
1698
线段树成段更新
点击打开链接题意:给你T组数据,每组N个数,初始为1,M个操作,每个操作将区间a到b的值更新为才,问n个数的和。思路:简单的线段树成段更新,需要用到懒惰标记,说白了懒惰标记就是用到的时候再去更新它,不然就放在那里#include#include#include#include#includeusingnamespacestd;constintinf=0x3f3f3f3f;constintmaxn=
Dan__ge
·
2016-03-16 20:50
线段树&树状数组
线段树
HDU
1698
线段树成段更新
点击打开链接题意:给你T组数据,每组N个数,初始为1,M个操作,每个操作将区间a到b的值更新为才,问n个数的和。思路:简单的线段树成段更新,需要用到懒惰标记,说白了懒惰标记就是用到的时候再去更新它,不然就放在那里#include #include #include #include #include usingnamespacestd; constintinf=0x3f3f3f3f; consti
Dan__ge
·
2016-03-16 20:00
数据结构
线段树
ACM
HDU
懒惰标记
HDU
1698
线段树成段更新
点击打开链接题意:给你T组数据,每组N个数,初始为1,M个操作,每个操作将区间a到b的值更新为才,问n个数的和。思路:简单的线段树成段更新,需要用到懒惰标记,说白了懒惰标记就是用到的时候再去更新它,不然就放在那里#include #include #include #include #include usingnamespacestd; constintinf=0x3f3f3f3f; consti
Dan__ge
·
2016-03-16 20:00
数据结构
线段树
ACM
HDU
懒惰标记
hdu -
1698
很水的线段树 lazy
题意:屠夫有一个钩子,由n节棍子组成(编号:1-n),每节棍子可以是金-3,银-2,铜-1的材质。原本是铜组成的,会有几个操作,每一个操作是:输入l,r,num,然后把编号为[l,r]的棍子材质替换为num。求最后的所有棍子材质和。只有一个知识点那就是lazy,懒惰标记。下面贴一下我我自己的代码,注解都写在下面。题目比较水,我也写得比较水,最后那个查询求和可以优化。#include #includ
qq_24664053
·
2016-03-04 14:00
HDU
1698
Just a Hook(线段树 + 区间修改 + 求和)
题目链接分析:1-N区间内初始都是1,然后q个询问,每个询问修改区间【a,b】的值为2或3或者1,统计最后整个区间的和本来想刷刷手速,结果还是写了一个小时,第一个超时,因为输出的时候去每个区间查找了,直接输出tree[1].value就可以了=_=1#include 2#include 3#include 4#include 5usingnamespacestd; 6constintMa
zhaop
·
2016-03-03 15:00
lmdb数据格式
creating-lmdb-in-python/https://lmdb.readthedocs.org/en/release/https://github.com/BVLC/caffe/issues/
1698
一动不动的葱头
·
2016-02-27 10:00
hdu
1698
(线段树区间更新)
解题思路:线段树区间更新水题。#include #include #include usingnamespacestd; constintmaxn=100005; structseg { intl,r,sum,lazy; }tree[maxn>1; build(l,mid,2*u); build(mid+1,r,2*u+1); } voidPushDown(intu) { tree[2*u].
hexianhao
·
2016-02-22 14:00
数据结构
hdu
1698
Just a Hook
JustaHook题意:给定一个长度为N(1 #include #include #include #include #include #include #include #include #include #include #include #include usingnamespacestd; #definerep0(i,l,r)for(inti=(l);i(l);
hxer
·
2016-02-16 17:00
HDU 1055:Color a Tree【贪心】
ColoraTreeTimeLimit:2000/1000MS(Java/Others) MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):
1698
lin14543
·
2016-02-11 23:00
hdu
1698
Just a Hook(线段树区间覆盖)
#include #include usingnamespacestd; #definelsonl,m,rt>1))*col[rt]; sum[rt>1)*col[rt]; col[rt]=0; } } voidbuild(intl,intr,intrt){ col[rt]=0; sum[rt]=1; if(l==r)return; intm=(l+r)>>1; build(lson); bui
u014552756
·
2016-02-03 18:00
Just a Hook (HDU_
1698
) 线段树+区间更新
JustaHookTimeLimit:4000/2000MS(Java/Others) MemoryLimit:32768/32768K(Java/Others)TotalSubmission(s):24870 AcceptedSubmission(s):12411ProblemDescriptionInthegameofDotA,Pudge’smeathookisactuallyth
Keeping111
·
2016-02-02 10:00
线段树
poj
区间更新
poj
1698
Alice's Chance 二分图最大匹配
题目大意:爱丽丝要拍电影,有n部电影,规定爱丽丝每部电影在每个礼拜只有固定的几天可以拍电影,只可以拍前面w个礼拜,并且这部电影要拍d天,问爱丽丝能不能拍完所有的电影第一行代表有多少组数据对于每组数据第一行代表有n部电影接下来2到n+1行,每行代表一个电影,每行9个数,前面7个数,1代表拍,0代表不拍,第8个数代表要拍几天,第9个数代表有几个礼拜时间拍。分析:先把天数和电影建二分图,然后把点0设为源
qq_33229466
·
2016-02-01 12:00
kuangbin_SegTree E (HDU
1698
)
POJ服务器炸了还没好呢然后就只能跳掉一些题目了这题也是成段更新模板题本来lazy标记不是很明白后来学长上课讲了一下就知道原理了回去看看代码很容易就理解了#include #include #include #include #include #defineINF0x3f3f3f3f #definelsonl,m,rt>1))*col[rt]; sum[rt>1)*col[rt];
失踪百景
·
2016-01-29 14:00
HDU
1698
(线段树区间更新)
JustaHookTimeLimit:4000/2000MS(Java/Others) MemoryLimit:32768/32768K(Java/Others)TotalSubmission(s):24705 AcceptedSubmission(s):12322ProblemDescriptionInthegameofDotA,Pudge’smeathookisactuallyth
longshanxiaoxuesheng
·
2016-01-21 14:00
hdu
1698
Just a Hook (线段树)
pid=
1698
JustaHookTimeLimit:4000/2000MS(Java/Others) MemoryLimit:32768/32768K(Java/Others)TotalSubmission
qiqi_skystar
·
2016-01-19 20:00
算法
C语言
MySQL ERROR
1698
(28000) 错误
MySQLERROR
1698
(28000)错误最近尝试安装最新版的MySQL5.7.10,结果出现了ERROR
1698
(28000),如下。
ReiAyanamii
·
2016-01-04 22:00
mysql
HDU
1698
Just a Hook(线段树)
Description对一个初始值都是1的区间[1,n]进行一些区间更新操作,每次将一个区间[a,b]的值更新为c,问更新后的区间和Input第一行为一整数T表示用例组数,每组用例第一行为一整数n表示区间大小,第二行为一整数q表示操作数,之后q行每行三个整数a,b,c表示将区间[a,b]的值都更新为cOutput对于每组用例,输出更新之后的区间和SampleInput1102152593Sampl
V5ZSQ
·
2016-01-02 21:00
HDU
1698
Just a Hook(线段树区间修改)
题目链接:点击打开链接题意:输入一个n表示一段长度为n的区间,有n个编号为1~n的点,初始值全部为1。有q个操作,每个操作有3个数:l,r,v表示将区间l~r的所有元素修改为v。求经过q次修改后的整个区间的值之和。该题是最典型的线段树区间修改问题,需要用到所谓的懒惰标记。 听起来挺难的,其实非常简单,其原理如下:因为修改很多值,如果还是按照原来的更新方法,每个结点更新一次的话,速度实在太慢。那么能
weizhuwyzc000
·
2016-01-01 20:00
数据结构
线段树
HDU
hdu
1698
Just a Hook(线段树)
JustaHookTimeLimit:4000/2000MS(Java/Others)MemoryLimit:32768/32768K(Java/Others)TotalSubmission(s):24473AcceptedSubmission(s):12193ProblemDescriptionInthegameofDotA,Pudge’smeathookisactuallythemosthor
随心丶而遇
·
2015-12-17 20:05
ACM—图论
ACM-线段树
各OJ刷题专栏
hdu
1698
Just a Hook(线段树)
JustaHookTimeLimit:4000/2000MS(Java/Others)MemoryLimit:32768/32768K(Java/Others)TotalSubmission(s):24473AcceptedSubmission(s):12193ProblemDescriptionInthegameofDotA,Pudge’smeathookisactuallythemosthor
d_x_d
·
2015-12-17 20:00
线段树
杭电
1698
just a hook (线段树)(区间更改值)
JustaHookTimeLimit:4000/2000MS(Java/Others) MemoryLimit:32768/32768K(Java/Others)TotalSubmission(s):24416 AcceptedSubmission(s):12165ProblemDescriptionInthegameofDotA,Pudge’smeathookisactuallyth
mengxiang000000
·
2015-12-07 22:00
杭电
1698
HDU
1698
Just a Hook(线段树的区间更新《标记》)
题目大意:首先区间1-N的数都是1,然后让你把区间a-b的值改变为c;思路:裸的区间更新。比单点更新就是多了一个标记的la[]数组,用来代表在某个区间的数需要给便成la[],其具体的用法就是,在创建线段树的同时要la[]数组清空。在区间改变时将改变的量赋值给la[],然后把la[]数组下放对于此题,是将所有la[]的左右孩子都直接改变为la[]的值即可。然后改变左右孩子的sum[],有两种情况:左
Grit_ICPC
·
2015-12-03 20:14
模板
HDU
1698
Just a Hook(线段树的区间更新《标记》)
题目大意:首先区间1-N的数都是1,然后让你把区间a-b的值改变为c;思路:裸的区间更新。比单点更新就是多了一个标记的la[]数组,用来代表在某个区间的数需要给便成la[],其具体的用法就是,在创建线段树的同时要la[]数组清空。在区间改变时将改变的量赋值给la[],然后把la[]数组下放对于此题,是将所有la[]的左右孩子都直接改变为la[]的值即可。然后改变左右孩子的sum[],有两种情况:左
Grit_ICPC
·
2015-12-03 20:00
线段树
HDU
1698
Just a Hook 题解&代码
题目要求是对于一个初始值均为1的区间进行区间修改,修改目标为:[a,b]区间内的值被修改为c对于多组数据的每组数据输出q次修改后的全区间和基本线段树了…只有两个元素需要维护:sum和add,sum表示该点的区间元素和,add表示该点代表的区间当前被赋值的大小坑点在于多组数据==要不是某人前(jie)车(wo)之(dai)鉴(ma)我二十分钟肯定调不过,尽管如此也WA了四次==总之,时刻记住这是多组
Rainbow6174
·
2015-12-01 20:00
线段树
C语言
HDU
【HDU
1698
】Just a Hook 线段树 区间覆盖更新+延迟
JustaHookTimeLimit:4000/2000MS(Java/Others) MemoryLimit:32768/32768K(Java/Others)TotalSubmission(s):24314 AcceptedSubmission(s):12127ProblemDescriptionInthegameofDotA,Pudge’smeathookisactuallyth
ALPS233
·
2015-11-29 17:00
hdu
1698
Just a Hook 线段树求解
JustaHookTimeLimit:4000/2000MS(Java/Others) MemoryLimit:32768/32768K(Java/Others)ProblemDescriptionInthegameofDotA,Pudge’smeathookisactuallythemosthorriblethingformostoftheheroes.Thehookismadeupofs
DERITt
·
2015-11-29 17:00
hdu
1698
Just a Hook 线段树求解
JustaHookTimeLimit:4000/2000MS(Java/Others) MemoryLimit:32768/32768K(Java/Others)ProblemDescriptionInthegameofDotA,Pudge’smeathookisactuallythemosthorriblethingformostoftheheroes.Thehookismadeupofs
DERITt
·
2015-11-29 17:00
hdu--
1698
JustaHookTimeLimit:4000/2000MS(Java/Others) MemoryLimit:32768/32768K(Java/Others)TotalSubmission(s):24217 AcceptedSubmission(s):12098ProblemDescriptionInthegameofDotA,Pudge’smeathookisactuallyth
MBLHQ
·
2015-11-25 12:00
Hdu
1698
【线段树 成段更新】.cpp
题意: 动态更新一段区间的值.. 最后输出总区间的和.. 思路: 其实就是线段树的成段更新.. 用到了lazy[] 表示懒惰标志.. 懒惰标记: 就是每次更新不更新到最后..而是更新到包含了区间的最大的节点.. 然后如果下次更新的时候更新到了上次已经更新到的节点.. 那先把上次更新暂停的节点往下更新..直到这次更新的区间
·
2015-11-13 14:52
HDU
线段树 [成段更新] HDU
1698
Just a Hook
成段更新,需要用到延迟标记(或者说懒惰标记),简单来说就是每次更新的时候不要更新到底,用延迟标记使得更新延迟到下次需要更新or询问到的时候. 此处建议在纸上模拟一遍。 Problem Description In the game of DotA, Pudge’s meat hook is actually the most horrible thing for most
·
2015-11-13 14:03
HDU
hdu
1698
#include<stdio.h> #include<string.h> #define N 100000 struct st{ int x,y,yanchi; }a[N*4]; void build(int t,int x,int y) { a[t].x=x; a[t].y=y; a[t].yanchi=1; i
·
2015-11-13 12:07
HDU
hdu
1698
线段树
#include<iostream>#include<cstdio>#include<cstring>using namespace std;const int MAX=100000;int svalue;struct node{ int left,right,cover;};node tree[MAX*3];bool used[31];void bu
·
2015-11-13 11:40
HDU
hdu
1698
Just a Hook(线段树区区)
pid=
1698
题目大意: 给出初试值都为1的区间[1,n] &
·
2015-11-13 09:07
HDU
HDU
1698
_Just a Hook(线段树/成段更新)
解题报告 题意: 原本区间1到n都是1,区间成段改变成一个值,求最后区间1到n的和。 思路: 线段树成段更新,区间去和。 #include <iostream> #include <cstdio> #include <cstring> using namespace std; int sum[500000],lz[500000]; void pu
·
2015-11-13 08:56
HDU
net下载
tid=
1698
&u=83 【北大青鸟 】【Asp.net 视频(主讲:于
·
2015-11-13 08:23
net
hdu
1698
(线段树)
pid=
1698
线段树功能:update:成段替换 (由于只query一次总区间,所以可以直接输出1结点的信息) #pragma comment(linker,"
·
2015-11-13 07:05
HDU
上一页
4
5
6
7
8
9
10
11
下一页
按字母分类:
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
其他