•  
  • Archives for 数据结构 (20)

【HDU4046】Panda(36届北京赛区网络赛题,线段树)

Categories: 数据结构和算法
Comments: No Comments
Published on: 2011 年 09 月 20 日

When I wrote down this letter, you may have been on the airplane to U.S.
We have known for 15 years, which has exceeded one-fifth of my whole life. I still remember the first time we went to the movies, the first time we went for a walk together.I still remember the smiling face you wore when you were dressing in front of the mirror. I love your smile and your shining eyes. When you are with me, every second is wonderful. (more...)

【HDU1754】I Hate It(线段树)

Categories: 数据结构和算法
Comments: No Comments
Published on: 2011 年 09 月 20 日

很多学校流行一种比较的习惯。老师们很喜欢询问,从某某到某某当中,分数最高的是多少。这让很多学生很反感。 (more...)

【HDU1004】Let the Balloon Rise(stl map水过,哈希表)

Categories: 数据结构和算法
Comments: No Comments
Published on: 2011 年 09 月 15 日

Contest time again! How excited it is to see balloons floating around. But to tell you a secret, the judges' favorite time is guessing the most popular problem. When the contest is over, they will count the balloons of each color and find the result. (more...)

【HDU3706】Second My Problem First(单调队列)

Categories: 数据结构和算法
Comments: No Comments
Published on: 2011 年 05 月 18 日

Give you three integers n, A and B.
Then we define Si = Ai mod B and Ti = Min{ Sk | i-A < = k <= i, k >= 1}
Your task is to calculate the product of Ti (1 < = i <= n) mod B. 题意:略了吧。。。结果是求Ti模B的乘积。 (more...)

【HDU1894】String Compare(字典树超时,排序水过)

Categories: 数据结构和算法
Tags: ,
Comments: No Comments
Published on: 2011 年 05 月 11 日

Maybe there are 750,000 words in English and some words are prefix of other words, for example: the word "acm" can be treat as one prefix of "acmicpc". What's more, most of such pairs of words have relationship between them. Now give you a dictionary, your work is to tell me how many such pairs. (more...)

【HDU1892】See you~(二维树状数组)

Categories: 数据结构和算法
Tags: ,
Comments: No Comments
Published on: 2011 年 05 月 11 日

Now I am leaving hust acm. In the past two and half years, I learned so many knowledge about Algorithm and Programming, and I met so many good friends. I want to say sorry to Mr, Yin, I must leave now ~~>.< ~~. I am very sorry, we could not advanced to the World Finals last year. (more...)

【POJ2823】Sliding Window(单调队列的原理和简单应用)

Categories: 数据结构和算法
Comments: No Comments
Published on: 2011 年 05 月 05 日

单调递减队列是这么一个队列,它的头元素一直是队列当中的最大值,而且队列中的值是按照递减的顺序排列的。我们可以从队列的末尾插入一个元素,可以从队列的两端删除元素。
(more...)

【POJ2528】Mayor's posters ||【NYOJ9】 (线段树)

Categories: 数据结构和算法
Comments: No Comments
Published on: 2011 年 04 月 12 日

北大poj这题测试数据有错,离散化错误,请到这里提交http://acm.nyist.net/JudgeOnline/problem.php?pid=9测试你的程序。

代码注释比较详细,不再赘述 (more...)

《数据结构与算法分析》5000字缩写

Comments: No Comments
Published on: 2011 年 04 月 07 日

好吧,这是搬运Matrix67的第二篇博文了……搬运理由嘛……同前一篇。。。所谓温故而知新,老知识看看神牛写的同样能学到新知识。

持续的:前人V5,后人奋进啊啊啊啊啊
===================================
(more...)

NYOJ129 树的判定 || POJ1308 Is It A Tree? 【并查集应用,树的定义】

Categories: 数据结构和算法
Comments: No Comments
Published on: 2011 年 04 月 06 日

http://acm.nyist.net/JudgeOnline/problem.php?pid=129

一个有向图入度为1的节点仅有一个,并且无环,则是一颗树。
(more...)

POJ 1703 Find them, Catch them [数据结构-并查集 union-find sets]

Categories: 数据结构和算法
Comments: No Comments
Published on: 2011 年 03 月 28 日

十分类似POJ2492 a bug‘s life,稍微修改一下即可提交。2492见http://blog.csdn.net/hzyhouzhiyuan/archive/2011/03/28/6283849.aspx (more...)

POJ 2492 A Bug's Life [数据结构-并查集 union-find sets]

Categories: 数据结构和算法
Comments: No Comments
Published on: 2011 年 03 月 28 日

不懂请看食物链:http://blog.csdn.net/hzyhouzhiyuan/archive/2011/03/23/6272253.aspx (more...)

POJ 1861 Network [最小生成树算法MST-kruskal 数据结构-并查集 union-find sets]

Categories: 数据结构和算法
Comments: No Comments
Published on: 2011 年 03 月 28 日

跟这个prim算法最小生成树http://blog.csdn.net/hzyhouzhiyuan/archive/2011/01/23/6159382.aspx

两个算法,邻接矩阵存图时,prim适用于稠密图,kruskal适于用稀疏图。

代码还是比较清晰明了的,输入所有边,进行排序,贪心+并查集求出MST。
(more...)

page 1 of 2»
文章归档
日历
2017年十一月
« 七    
 1234
567891011
12131415161718
19202122232425
2627282930  
标签云
sina weibo
我的广告可能就是你的信息

Welcome , today is 星期日, 2017 年 11 月 19 日