http://acm.hdu.edu.cn/showproblem.php?pid=1754照着hdu 1166 的模板稍加改动即可#include#include#include#includeusing namespace std;int sum[1000000];void push(int r...
分类:
其他好文 时间:
2015-02-02 17:54:43
阅读次数:
116
http://acm.hdu.edu.cn/showproblem.php?pid=4302
Problem Description
Holedox is a small animal which can be considered as one point. It lives in a straight pipe whose length is L. Holedox can on...
分类:
其他好文 时间:
2015-01-20 22:14:50
阅读次数:
194
Problem Description
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 ...
分类:
其他好文 时间:
2015-01-17 15:14:49
阅读次数:
259
敌兵布阵
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 47667 Accepted Submission(s): 20182
Problem Description
C国的死对头A国这段时间正在进行军事演...
分类:
其他好文 时间:
2015-01-07 18:58:16
阅读次数:
128
I Hate It
Time Limit: 9000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 41510 Accepted Submission(s): 16458
Problem Description
很多学校流行一种比较的习惯。...
分类:
其他好文 时间:
2015-01-07 18:57:48
阅读次数:
105
poj 2886 Who Gets the Most Candies?
Description
N children are sitting in a circle to play a game.
The children are numbered from 1 to N in clockwise order. Each of them has a card with ...
分类:
其他好文 时间:
2014-12-30 23:42:05
阅读次数:
310
线段树(segment tree),一种二叉搜索树。比较常用。 就像这样。 推荐直接看http://wenku.baidu.com/view/94a8c01959eef8c75fbfb3d4.html (杭电的大神写的,十分推荐,特别棒。)例题:HDU 1166HDU 1754HDU 139...
分类:
其他好文 时间:
2014-12-28 22:01:48
阅读次数:
175
Buy Tickets
Time Limit: 4000MS
Memory Limit: 65536K
Total Submissions: 14077
Accepted: 7060
Description
Railway tickets were difficult to buy around the Lunar New Yea...
分类:
其他好文 时间:
2014-12-08 21:31:35
阅读次数:
254
题目:http://acm.hdu.edu.cn/showproblem.php?pid=1166根据网上大神的简短代码模板自己重新打了一遍,也加深理解#include#define lson l,m,rt> 1; build(lson); build(rson); pushup(...
分类:
其他好文 时间:
2014-11-20 23:11:15
阅读次数:
184
题意:初始序列 1, 2, ..., n,m次操作(1
D l r,将区间[l, r]中的所有数复制一次;
Q l r,输出区间[l, r]中同一数字个数的最大值。
(0
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4973
——>>因为区间内数字是依次递增的,所以可以以数字为叶建线段树去维护区间同一数字个数最大值。。
原查询区...
分类:
其他好文 时间:
2014-10-29 07:06:29
阅读次数:
238