ACM_线段树
LzyRapX
Just For Fun .
展开
-
L3-2. 堆栈(线段树)
L3-2. 堆栈时间限制200 ms内存限制65536 kB代码长度限制8000 B判题程序Standard作者陈越大家都知道“堆栈”是一种“先进后出”的线性结构,基本操作有“入栈”(将新元素插入栈顶)和“出栈”(将栈顶元素的值返回并从堆栈中将其删除)原创 2016-05-13 21:29:01 · 869 阅读 · 0 评论 -
Educational Codeforces Round 20 G. Periodic RMQ Problem(线段树动态开点)
题目链接: 点击我打开题目题意: 给你一个nn个数的序列,将它复制粘贴kk次得到新的序列。 在新的序列上有22个操作:区间赋值,区间取最小值。题解:其实就是线段树动态开点。其他和普通的线段树差不多吧。代码:#include<bits/stdc++.h>using namespace std;const int mod=1e9+7;typedef long long ll;#define原创 2017-05-15 20:05:51 · 529 阅读 · 0 评论 -
操作格子 (线段树)(单点修改,区间求最值,区间求和)
问题描述有n个格子,从左到右放成一排,编号为1-n。共有m次操作,有3种操作类型:1.修改一个格子的权值,2.求连续一段格子权值和,3.求连续一段格子的最大值。对于每个2、3操作输出你所求出的结果。输入格式第一行2个整数n,m。接下来一行n个整数表示n个格子的初始权值。接下来m行,每行3个整数p,x,y,p原创 2017-03-07 18:56:08 · 633 阅读 · 0 评论 -
HDU 5751 BestCoder Round #84 Eades(线段树+FFT)
EadesTime Limit: 12000/6000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 140 Accepted Submission(s): 71Problem DescriptionPeter has a number sequenc原创 2016-10-08 23:13:20 · 744 阅读 · 0 评论 -
Codeforces Round #353 (Div. 2) E. Trains and Statistic (线段树+dp)
E. Trains and Statistictime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputVasya commutes by train every day.原创 2016-09-04 20:30:10 · 530 阅读 · 1 评论 -
POJ 2828 Buy Tickets (线段树:单点更新)
Buy TicketsTime Limit: 4000MSMemory Limit: 65536KTotal Submissions: 18675Accepted: 9277DescriptionRailway tickets were difficult to buy around the Lunar New Y原创 2016-09-13 23:59:50 · 498 阅读 · 0 评论 -
HDU 2795 Billboard (线段树:区间查询最大值)
BillboardTime Limit: 20000/8000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 19799 Accepted Submission(s): 8277Problem DescriptionAt the entrance to t原创 2016-09-13 17:49:18 · 654 阅读 · 0 评论 -
HDU 1394 Minimum Inversion Number (线段树:单点增减求和)
Minimum Inversion NumberTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 18375 Accepted Submission(s): 11156Problem DescriptionThe i原创 2016-09-12 21:12:45 · 459 阅读 · 0 评论 -
HDU 1698 Just a Hook (线段树:成段替换)
Just a HookTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 28680 Accepted Submission(s): 14209Problem DescriptionIn the game of Dot原创 2016-09-12 22:35:43 · 478 阅读 · 0 评论 -
HDU 1754 I Hate It (线段树:单点替换求最值)
I Hate ItTime Limit: 9000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 66254 Accepted Submission(s): 25769Problem Description很多学校流行一种比较的习惯。老师们很喜欢原创 2016-09-12 23:38:17 · 443 阅读 · 0 评论 -
HDU 1166 敌兵布阵 (线段树:单点增减求和)
敌兵布阵Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 78396 Accepted Submission(s): 33118Problem DescriptionC国的死对头A国这段时间正在进行军事演习,所以原创 2016-09-08 14:01:42 · 459 阅读 · 0 评论 -
HDU 5726 GCD (线段树维护区间gcd)
GCDTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 2445 Accepted Submission(s): 855Problem DescriptionGive you a sequence of N(N原创 2016-08-01 13:56:16 · 2827 阅读 · 0 评论 -
ACdream 1101 瑶瑶想要玩滑梯 (线段树)(区间替换+区间查询LCIS)
题目链接: ACdream 1101题意: 给你一个区间,每次修改可以修改一段区间的值,也可以询问一个区间,问你这个区间中(严格上升) 最长连续上升的列长度(LCIS) (LCIS)有多长?题解: 线段树。其实就是区间替换和区间查询。调了好久,太久不写会变菜。这是个不争的事实。AC代码:/** this code is made by LzyRapx* Problem: 1101* V原创 2017-07-09 15:38:18 · 392 阅读 · 0 评论