上一页 1 2 3 4 5 6 7 8 9 10 ··· 15 下一页
摘要: 题目地址:http://ac.jobdu.com/problem.php?pid=1446题目描述: One way that the police finds the head of a gang is to check people's phone calls. If there is a ph... 阅读全文
posted @ 2014-02-23 15:49 liushaobo 阅读(492) 评论(0) 推荐(0) 编辑
摘要: 题目地址:http://poj.org/problem?id=1080DescriptionIt is well known that a human gene can be considered as a sequence, consisting of four nucleotides, whic... 阅读全文
posted @ 2014-02-23 09:57 liushaobo 阅读(148) 评论(0) 推荐(0) 编辑
摘要: 题目地址:http://poj.org/problem?id=1050DescriptionGiven a two-dimensional array of positive and negative integers, a sub-rectangle is any contiguous sub-a... 阅读全文
posted @ 2014-02-22 17:26 liushaobo 阅读(218) 评论(0) 推荐(0) 编辑
摘要: 题目地址:http://poj.org/problem?id=1088DescriptionMichael喜欢滑雪百这并不奇怪, 因为滑雪的确很刺激。可是为了获得速度,滑的区域必须向下倾斜,而且当你滑到坡底,你不得不再次走上坡或者等待升降机来载你。Michael想知道载一个区域中最长底滑坡。区域由一... 阅读全文
posted @ 2014-02-22 16:40 liushaobo 阅读(146) 评论(0) 推荐(0) 编辑
摘要: 题目地址:http://ac.jobdu.com/problem.php?pid=1534题目描述: 给定两个整型数组A和B。我们将A和B中的元素两两相加可以得到数组C。譬如A为[1,2],B为[3,4].那么由A和B中的元素两两相加得到的数组C为[4,5,5,6]。现在给你数组A和B,求由A和B两... 阅读全文
posted @ 2014-02-22 11:06 liushaobo 阅读(164) 评论(0) 推荐(0) 编辑
摘要: 题目地址:http://oj.tsinsen.com/A1082问题描述 给定一个大小为n的数组s和一个整数K,请找出数组中的第K小元素。 这是一个补充程序的试题,你需要完成一个函数: int findKth(int *s, int n, int K) 表示在s指向的数组中找到第K小的元素(... 阅读全文
posted @ 2014-02-22 10:15 liushaobo 阅读(527) 评论(0) 推荐(1) 编辑
摘要: 题目地址:http://ac.jobdu.com/problem.php?pid=1530题目描述: 最长不重复子串就是从一个字符串中找到一个连续子串,该子串中任何两个字符都不能相同,且该子串的长度是最大的。输入: 输入包含多个测试用例,每组测试用例输入一行由小写英文字符a,b,c...x,y,z组... 阅读全文
posted @ 2014-02-21 15:02 liushaobo 阅读(141) 评论(0) 推荐(0) 编辑
摘要: 作者:Yx.Ac出处:勇幸|Thinking (http://www.ahathinking.com)题:从一个字符串中找到一个连续子串,该子串中任何两个字符不能相同,求子串的最大长度并输出一条最长不重复子串。本节从最直接的方法逐步优化,渐进探索了四种实现方式,并最终找到时间复杂度为O(N),辅助空... 阅读全文
posted @ 2014-02-21 14:59 liushaobo 阅读(804) 评论(0) 推荐(0) 编辑
摘要: 题目地址:http://ac.jobdu.com/problem.php?pid=1526题目描述: 假如已知有n个人和m对好友关系(存于数字r)。如果两个人是直接或间接的好友(好友的好友的好友...),则认为他们属于同一个朋友圈,请写程序求出这n个人里一共有多少个朋友圈。假如:n = 5 , m ... 阅读全文
posted @ 2014-02-19 17:25 liushaobo 阅读(377) 评论(0) 推荐(0) 编辑
摘要: 作者:Yx.Ac出处:勇幸|Thinking (http://www.ahathinking.com) 昨天和今天学习了并查集和trie树,并练习了三道入门题目,理解更为深刻,觉得有必要总结一下,这其中的内容定义之类的是取自网络,操作的说明解释及程序的注释部分为个人理解。并查集学习:并查集:(uni... 阅读全文
posted @ 2014-02-19 16:50 liushaobo 阅读(191) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 15 下一页