
数据结构
断弦
这个作者很懒,什么都没留下…
展开
-
HDU 1754:I Hate It_线段树
Time Limit: 9000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 15372 Accepted Submission(s): 5975Problem Description很多学校流行一种比较的习惯。老师们很喜欢询问,从某某原创 2012-07-11 19:50:09 · 500 阅读 · 0 评论 -
POJ 3468 :A Simple Problem with Integers——区间更新线段树经典题目
/*经典区间成段更新题目。题意:给出一个长度n的数字序列,已经m个操作,Q操作给出l,r:访问区间[l,r]的数字和;C操作给出l,r,x:将区间[l,r]内的所有数字都加上x。Sample Input10 51 2 3 4 5 6 7 8 9 10Q 4 4Q 1 10Q 2 4C 3 6 3Q 2 4Sample Output原创 2012-07-16 10:32:10 · 494 阅读 · 0 评论 -
学院OJ:1684:Light on or off __线段树 区间更新
http://220.166.52.162/oj/showproblem?problem_id=1684DescriptionThere is N lights on the wall of Dreamone’s house from left to right.Initially,some lights on and some lightsoff, and we use ‘1’原创 2012-07-16 22:08:49 · 945 阅读 · 0 评论 -
单点更新+区间求最值与和_线段树
除了平时做练习赛外,现在主要学习数论与数据结构,数据结构丢了好久了,重新学习还是发现了很多问题!/*题意:在每个测试的第一行,是两个正整数 N 和 M ( 0学生ID编号分别从 1 编到 N。第二行包含 N 个整数(范围在 0 到 100 ),代表这 N 个学生的初始成绩,其中第 i 个数代表 ID 为 i 的学生的成绩。接下来有 M 行,每行有三个数,意思如下:先输入一个原创 2012-07-16 10:29:04 · 557 阅读 · 0 评论 -
POJ 2777:Count Color——线段树
DescriptionChosen Problem Solving and Program design as an optional course, you are required to solve all kinds of problems. Here, we get a new problem. There is a very long board with length L c原创 2012-07-19 09:32:10 · 474 阅读 · 0 评论 -
HDU - 4302 :Holedox Eating ,线段树、树状数组+二分,优先队列
DescriptionHoledox is a small animal which can be considered as one point. It lives in a straight pipe whose length is L. Holedox can only move along the pipe. Cakes may appear anywhere in the pip原创 2012-07-21 10:35:52 · 620 阅读 · 0 评论