![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
ACM-树
Sky-J
这个作者很懒,什么都没留下…
展开
-
hdu1166树状数组模板题
#define DeBUG#include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std ;#define zero {0}#define原创 2014-03-13 14:28:18 · 544 阅读 · 0 评论 -
线段树区间更新区间求和(转延迟标记精讲)
A Simple Problem with Integers Time Limit : 10000/5000ms (Java/Other) Memory Limit : 262144/131072K (Java/Other)Total Submission(s) : 50 Accepted Submission(s) : 23Problem DescriptionYou原创 2014-06-22 22:36:21 · 767 阅读 · 0 评论 -
HDU1698线段树区间更新,一次查询
#define DeBUG#include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std ;#define zero {0}#define原创 2014-03-14 12:13:48 · 578 阅读 · 0 评论 -
树状数组二维扩展
See you~Time Limit: 5000/3000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 3418 Accepted Submission(s): 1075Problem DescriptionNow I am leaving hust原创 2014-06-21 10:44:18 · 594 阅读 · 0 评论 -
hdu1556 color the ball 树状数组区间更新单点查询(附线段树做法)与二维扩展
Color the ball #define DeBUG#include #include #include #include #include #include #include #include #include #include #include #include #include #include using原创 2014-06-20 16:50:08 · 685 阅读 · 0 评论 -
HDU3724 AC自动机版改字典树
#define DeBUG#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std原创 2014-07-12 19:38:21 · 534 阅读 · 0 评论 -
【HDU4893Wow! Such Sequence!】线段树-单点+区间更新、区间查询(再次体会两种写法)
Wow! Such Sequence!Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1892 Accepted Submission(s): 583Problem DescriptionRecent原创 2014-07-30 18:01:31 · 529 阅读 · 0 评论 -
经典线段树敌兵布阵
#define DeBUG#include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std ;#define zero {0}#define原创 2014-06-22 20:42:26 · 632 阅读 · 0 评论 -
【线段树】PKU2777 区间更新区间询问(位优化)
Count ColorTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 34059 Accepted: 10269DescriptionChosen Problem Solving and Program design as an optional cour原创 2014-06-23 10:57:43 · 558 阅读 · 0 评论 -
HDU1754线段树单点更新区间查询(数组版)
I Hate ItTime Limit: 9000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 34847 Accepted Submission(s): 13724Problem Description很多学校流行一种比较的习惯。老师们很原创 2014-06-22 11:12:21 · 494 阅读 · 0 评论 -
树状数组详解(转)
树状数组(Binary Indexed Trees)November 15, 2012作者:Hawstein出处:http://hawstein.com/posts/binary-indexed-trees.html声明:本文采用以下协议进行授权: 自由转载-非商用-非衍生-保持署名|Creative Commons BY-NC-ND 3.0 ,转载请注明作者及出处。转载 2014-06-20 15:27:56 · 445 阅读 · 0 评论 -
AC自动机资料汇总
概要介绍,一篇不错的文章AC自动机关键字:AC自动机 自动机 有限状态自动机 Trie 字母树 字符串匹配 多串匹配算法Note:阅读本文需要有KMP算法基础,如果你不知道什么是KMP,请看这里:http://www.matrix67.com/blog/article.asp?id=146 (Matrix67大牛写的)AC自动机是原创 2014-07-02 21:51:23 · 618 阅读 · 0 评论 -
HDU1394最小逆序数
层层优化,请往下看(按照编程复杂度排名)1.暴力 250ms#includeint a[5003];int main(){ int n, i, j, sum; while (scanf("%d", &n) != EOF) { sum = 0; for (i = 1; i <= n; i++) {原创 2014-03-13 17:23:27 · 524 阅读 · 0 评论 -
HDU2852 大于a的第k小数-树状数组
//sum(a)求的是小于等于a的数字个数#define DeBUG#include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std ;原创 2014-03-14 16:50:03 · 552 阅读 · 0 评论 -
hdu1247字典树
Hat’s WordsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 6816 Accepted Submission(s): 2510Problem DescriptionA hat’s word is a原创 2014-04-06 11:52:26 · 484 阅读 · 0 评论 -
hdu Phone List 字典树
Phone List Time Limit : 3000/1000ms (Java/Other) Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 29 Accepted Submission(s) : 18Problem DescriptionGiven a list of phone number原创 2014-04-06 11:55:51 · 527 阅读 · 0 评论 -
hdu1298 T9字典树 好题
T9Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1497 Accepted Submission(s): 581Problem DescriptionA while ago it was quite cum原创 2014-04-07 17:26:22 · 543 阅读 · 0 评论 -
HDU3308线段树上最长递增序列
LCISTime Limit: 6000/2000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3766 Accepted Submission(s): 1696Problem DescriptionGiven n integers.You ha原创 2014-06-23 14:34:53 · 556 阅读 · 0 评论 -
HDU3030最长上升子序列个数+树状数组求和+二分优化
Increasing Speed LimitsTime Limit: 2000/10000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 517 Accepted Submission(s): 259Problem DescriptionYou wer原创 2014-06-28 22:22:39 · 925 阅读 · 0 评论 -
uva599 The Forrest for the Trees并查集求树的数目
The Forrest for the TreesTime Limit:3000MS Memory Limit:0KB 64bit IO Format:%lld & %lluSubmit StatusDescription The Forrest for the Trees A graph原创 2014-07-05 16:37:05 · 955 阅读 · 0 评论 -
树状数组求逆序数
#define DeBUG#include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std ;#define zero {0}#define原创 2014-06-20 21:03:55 · 455 阅读 · 0 评论