
数据结构-线段树
wind_bow
.。
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
POJ 3468 A Simple Problem with Integers 线段树
You have N integers, A1, A2, ... , AN. You need to deal with two kinds of operations. One type of operation is to add some given number to each number in a given interval. The other is to ask for the ...原创 2018-07-29 19:28:35 · 139 阅读 · 0 评论 -
POJ 3264 Balanced Lineup 线段树
A - Balanced LineupFor the daily milking, Farmer John's N cows (1 ≤ N ≤ 50,000) always line up in the same order. One day Farmer John decides to organize a game of Ultimate Frisbee with some of t...原创 2018-07-28 14:20:29 · 143 阅读 · 0 评论 -
(Codeforces Round #413, rated, Div. 1 + Div. 2) C. Fountains 线段树
C. Fountainstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputArkady plays Gardenscapes a lot. Arkady wants to build two new fount...原创 2018-07-31 20:30:05 · 164 阅读 · 0 评论 -
P3384 树链剖分
题目描述如题,已知一棵包含N个结点的树(连通且无环),每个节点上包含一个数值,需要支持以下操作:操作1: 格式: 1 x y z 表示将树从x到y结点最短路径上所有节点的值都加上z操作2: 格式: 2 x y 表示求树从x到y结点最短路径上所有节点的值之和操作3: 格式: 3 x z 表示将以x为根节点的子树内所有节点值都加上z操作4: 格式: 4 x 表示求以x为根节点的子树...原创 2019-08-08 10:53:32 · 313 阅读 · 1 评论