
数据结构-线段树
偷吃了老鼠的土豆
戒骄戒躁,脚踏实地,坚持不懈,愈挫愈勇。
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
敌兵布阵(线段树)
传送门:https://vjudge.net/contest/66989#problem/A分析:求区间和,但是每个区间的值会有改变。因此想到了线段树。这是我写的第一到关于线段树的题。线段树讲解 我的ac代码:#include <iostream>#include <stdio.h>#define maxn 50005using namespace ...原创 2018-07-25 00:23:19 · 356 阅读 · 0 评论 -
poj3264(线段树区间最大值最小值)
题目:For 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 the cows. To keep th...原创 2018-08-22 23:10:10 · 259 阅读 · 0 评论 -
HDU 4027(线段树)
题目:A lot of battleships of evil are arranged in a line before the battle. Our commander decides to use our secret weapon to eliminate the battleships. Each of the battleships can be marked a value o...原创 2018-08-23 11:50:43 · 293 阅读 · 0 评论 -
HDU-1540(线段树区间合并)
题目:During the War of Resistance Against Japan, tunnel warfare was carried out extensively in the vast areas of north China Plain. Generally speaking, villages connected by tunnels lay in a line. Exc...原创 2018-08-24 01:05:37 · 204 阅读 · 0 评论 -
poj 2528贴海报(线段树+离散化)
题目: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 council has fina...原创 2018-08-21 17:00:40 · 289 阅读 · 0 评论 -
hdu-1698(线段树区间修改)
题目:In the game of DotA, Pudge’s meat hook is actually the most horrible thing for most of the heroes. The hook is made up of several consecutive metallic sticks which are of the same length. No...原创 2018-08-21 21:36:29 · 627 阅读 · 1 评论 -
HDU-3974(dfs序获得时间戳建立线段树)
题目:There is a company that has N employees(numbered from 1 to N),every employee in the company has a immediate boss (except for the leader of whole company).If you are the immediate boss of someone,...原创 2018-08-25 00:47:47 · 300 阅读 · 0 评论 -
poj--1177(线段树+离散化+扫描线)
题目:http://poj.org/problem?id=1177A number of rectangular posters, photographs and other pictures of the same shape are pasted on a wall. Their sides are all vertical or horizontal. Each rectangle ca...原创 2018-09-07 19:08:21 · 184 阅读 · 0 评论 -
HDU4614--线段树+二分
题目:Vases and Flowers Alice is so popular that she can receive many flowers everyday. She has N vases numbered from 0 to N-1. When she receive some flowers, she will try to put them in the vases, on...原创 2018-09-05 16:56:04 · 196 阅读 · 0 评论