数据结构
断弦
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
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): 5975 Problem Description 很多学校流行一种比较的习惯。老师们很喜欢询问,从某某原创 2012-07-11 19:50:09 · 517 阅读 · 0 评论 -
POJ 3468 :A Simple Problem with Integers——区间更新线段树经典题目
/* 经典区间成段更新题目。 题意:给出一个长度n的数字序列,已经m个操作, Q操作给出l,r:访问区间[l,r]的数字和; C操作给出l,r,x:将区间[l,r]内的所有数字都加上x。 Sample Input 10 5 1 2 3 4 5 6 7 8 9 10 Q 4 4 Q 1 10 Q 2 4 C 3 6 3 Q 2 4 Sample Output原创 2012-07-16 10:32:10 · 512 阅读 · 0 评论 -
学院OJ:1684:Light on or off __线段树 区间更新
http://220.166.52.162/oj/showproblem?problem_id=1684 Description There is N lights on the wall of Dreamone’s house from left to right.Initially,some lights on and some lights off, and we use ‘1’原创 2012-07-16 22:08:49 · 966 阅读 · 0 评论 -
单点更新+区间求最值与和_线段树
除了平时做练习赛外,现在主要学习数论与数据结构,数据结构丢了好久了,重新学习还是发现了很多问题! /* 题意:在每个测试的第一行,是两个正整数 N 和 M ( 0 学生ID编号分别从 1 编到 N。 第二行包含 N 个整数(范围在 0 到 100 ),代表这 N 个学生的初始成绩,其中第 i 个数代表 ID 为 i 的学生的成绩。 接下来有 M 行,每行有三个数,意思如下: 先输入一个原创 2012-07-16 10:29:04 · 577 阅读 · 0 评论 -
POJ 2777:Count Color——线段树
Description Chosen 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 · 497 阅读 · 0 评论 -
HDU - 4302 :Holedox Eating ,线段树、树状数组+二分,优先队列
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 only move along the pipe. Cakes may appear anywhere in the pip原创 2012-07-21 10:35:52 · 642 阅读 · 0 评论
分享