随笔分类 -  数据结构-线段树

摘要:Description 小明是一个非常浪漫的画家,他喜欢画各种奇奇怪怪的画,虽然没人理解他画的究竟是什么东西。 有一天,他突发奇想,对于一根木条,他每次从木条中选取一个区间[l,r]进行染色,经过多次染色后,他想知道在[a,b]区间中有几个未被染色的子区间? 可惜小明虽然画画非常厉害,但是并不擅长解 阅读全文
posted @ 2017-04-09 15:37 Robin! 阅读(231) 评论(0) 推荐(0) 编辑
摘要:1.HDU-1542 Atlantis Problem Description There are several ancient Greek texts that contain descriptions of the fabled island Atlantis. Some of these t 阅读全文
posted @ 2017-04-02 23:04 Robin! 阅读(365) 评论(0) 推荐(0) 编辑
摘要:Description Painting some colored segments on a line, some previously painted segments may be covered by some the subsequent ones. Your task is counti 阅读全文
posted @ 2017-03-21 20:17 Robin! 阅读(126) 评论(0) 推荐(0) 编辑
摘要:Problem Description During the War of Resistance Against Japan, tunnel warfare was carried out extensively in the vast areas of north China Plain. Gen 阅读全文
posted @ 2017-03-05 16:03 Robin! 阅读(113) 评论(0) 推荐(0) 编辑
摘要:Description The citizens of Bytetown, AB, could not stand that the candidates in the mayoral election campaign have been placing their electoral poste 阅读全文
posted @ 2017-02-28 20:05 Robin! 阅读(109) 评论(0) 推荐(0) 编辑
摘要:Problem Description 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 阅读全文
posted @ 2017-02-21 17:58 Robin! 阅读(203) 评论(0) 推荐(0) 编辑
摘要:Problem Description A lot of battleships of evil are arranged in a line before the battle. Our commander decides to use our secret weapon to eliminate 阅读全文
posted @ 2017-02-20 17:36 Robin! 阅读(199) 评论(0) 推荐(0) 编辑
摘要:Problem Description 很多学校流行一种比较的习惯。老师们很喜欢询问,从某某到某某当中,分数最高的是多少。这让很多学生很反感。不管你喜不喜欢,现在需要你做的是,就是按照老师的要求,写一个程序,模拟老师的询问。当然,老师有时候需要更新某位同学的成绩。 Input 本题目包含多组测试,请 阅读全文
posted @ 2017-02-18 22:40 Robin! 阅读(145) 评论(0) 推荐(0) 编辑
摘要:Problem Description C国的死对头A国这段时间正在进行军事演习,所以C国间谍头子Derek和他手下Tidy又开始忙乎了。A国在海岸线沿直线布置了N个工兵营地,Derek和Tidy的任务就是要监视这些工兵营地的活动情况。由于采取了某种先进的监测手段,所以每个工兵营地的人数C国都掌握的 阅读全文
posted @ 2017-02-17 21:01 Robin! 阅读(103) 评论(0) 推荐(0) 编辑
摘要:模板1:点修改:支持查询,更新; 1 #include<bits/stdc++.h> 2 using namespace std; 3 #define INF 0x3f3f3f3f 4 const int maxn = 1000 + 10; 5 int a[maxn], qL, qR, p, v; 阅读全文
posted @ 2017-02-16 22:05 Robin! 阅读(132) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示