算法
文章平均质量分 92
西域小车
这个作者很懒,什么都没留下…
展开
-
浅谈单链表快速排序
这几天笔者在参加学院的企业实训,其中有一个模块需要用到单链表的快速排序,因为之前的快速排序是针对于数组而言的,而对于链表则不支持下标的访问,因此单链表的排序就需要点技巧。 对于数组的快速排序,它的基本思路就是说选择一个数据为基准,将小于基准的元素放在这个元素的左边,大于基准的放在这个元素的右边,然后通过递归来对左右两个子数组分别进行快速排序。 笔者从以下两篇文章原创 2012-12-30 23:27:00 · 687 阅读 · 0 评论 -
1266 - Points in Rectangle[二维树状数组 + 容斥原理]
1266 - Points in RectanglePDF (English)StatisticsForumTime Limit: 2 second(s)Memory Limit: 32 MBAs the name says, this problem is about finding the numb原创 2014-09-03 00:07:24 · 397 阅读 · 0 评论 -
[POJ 2482]Stars in Your Window 扫描线
题目链接:http://poj.org/problem?id=2482题目大意:平面上有n个星星,原创 2014-09-26 15:44:14 · 442 阅读 · 0 评论 -
1011 - Marriage Ceremonies[状态压缩dp]
1011 - Marriage CeremoniesPDF (English)StatisticsForumTime Limit: 2 second(s)Memory Limit: 32 MBYou work in a company which organizes marriages. Marriag原创 2014-08-29 22:15:39 · 423 阅读 · 0 评论 -
USACO 2002 February
今天刷了刷USACO 2002 February,从年份上看题目已经很老了。。可是我还是刷不动。。。只能说是自己太弱了 还是需要多加练习才是啊。今天只做了三道题。。其中有一道题是刚才补得。。学习了一下树形dp。。实在是惭愧的很。。POJ 1949 - Chores(这是我做的这套题里的第一道题目)题目大意:给你N个任务,这些任务是可以并行开始的,但是部分原创 2014-08-29 20:32:14 · 551 阅读 · 0 评论 -
1005 - Rooks [组合数学]
1005 - RooksPDF (English)StatisticsForumTime Limit: 1 second(s)Memory Limit: 32 MBA rook is a piece used in the game of chess which is played on a board原创 2014-08-28 22:39:26 · 545 阅读 · 0 评论 -
[POJ 1823] Hotel 线段树区间合并
HotelTime Limit: 5000MS Memory Limit: 30000KTotal Submissions: 2064 Accepted: 885DescriptionThe "Informatics" hotel is one of the most luxurious hotels from Galac原创 2014-09-23 00:29:31 · 440 阅读 · 0 评论 -
LightOJ 1097 - Lucky Number [线段树二分前缀和构造数列]
1097 - Lucky NumberPDF (English)StatisticsForumTime Limit: 2 second(s)Memory Limit: 64 MBLucky numbers are defined by a variation of the well-known siev原创 2014-09-10 21:13:06 · 1156 阅读 · 0 评论 -
LightOJ 1087 - Diablo[线段树二分前缀和]
1087 - DiabloPDF (English)StatisticsForumTime Limit: 2 second(s)Memory Limit: 64 MBAll of you must have played the game 'Diablo'. It's an exclusive game原创 2014-09-10 00:08:04 · 559 阅读 · 0 评论 -
1080 - Binary Simulation[树状数组]
1080 - Binary SimulationPDF (English)StatisticsForumTime Limit: 2 second(s)Memory Limit: 64 MBGiven a binary number, we are about to do some operations原创 2014-09-01 22:12:07 · 436 阅读 · 0 评论 -
[ACM]5/28/2014 HDU-1203[dp]
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1203题目大意:给你原创 2014-05-28 23:10:18 · 548 阅读 · 0 评论 -
[POJ 2104]K-th Number 主席树
K-th NumberTime Limit: 20000MS Memory Limit: 65536KTotal Submissions: 37883 Accepted: 12273Case Time Limit: 2000MSDescriptionYou are working for Macrohard c原创 2014-09-24 18:00:51 · 440 阅读 · 0 评论