码迷,mamicode.com
首页 >  
搜索关键字:algorithm    ( 11758个结果)
nyoj 1070 诡异的电梯【Ⅰ】【dp】
题目:nyoj 1070 诡异的电梯【Ⅰ】 这个题目源自湘潭大学oj 1206 Dormitory's Elevator 是当时比赛的题目,题目都没有读清楚啊、 分析:这其实就是一个简单的一维dp,用dp【i】表示从1层上到第 i 层花费的最小的体力。 因为不能在相邻的楼层停留,所以可以从dp【i-2】转移,但这样不是最优的还要从dp【i-3】转移,因为这样的话就可以到达所...
分类:其他好文   时间:2014-09-17 16:58:12    阅读次数:266
Search for a Range <leetcode>
Given a sorted array of integers, find the starting and ending position of a given target value.Your algorithm's runtime complexity must be in the ord...
分类:其他好文   时间:2014-09-17 13:31:02    阅读次数:144
STL algorithm算法lexicographical_compare(30)
lexicographical_compare原型: std::lexicographical_compare default (1) template bool lexicographical_compare (InputIterator1 first1, InputIterator1 last1, ...
分类:其他好文   时间:2014-09-17 12:13:52    阅读次数:226
STL algorithm算法lower_bound和upper_bound(31)
lower_bound原型: function template std::lower_bound default (1) template ForwardIterator lower_bound (ForwardIterator first, ForwardIterator last, ...
分类:其他好文   时间:2014-09-17 12:09:32    阅读次数:235
STL algorithm算法is_permutation(27)
is_permutation原型: std::is_permutation equality (1) template bool is_permutation (ForwardIterator1 first1, ForwardIterator1 last1, ForwardIterator2 first2...
分类:其他好文   时间:2014-09-17 10:19:02    阅读次数:433
STL algorithm算法is_sorted和is_sorted_until(28)
is_sort的原型: ::is_sorted default (1) template bool is_sorted (ForwardIterator first, ForwardIterator last); custom (2) template bool is_sorted (ForwardIterator fir...
分类:其他好文   时间:2014-09-17 10:17:32    阅读次数:220
STL algorithm算法is_partitioned(26)
is_partitioned原型:...
分类:其他好文   时间:2014-09-16 23:49:01    阅读次数:471
hdu 4472 Count
http://acm.hdu.edu.cn/showproblem.php?pid=4472...
分类:其他好文   时间:2014-09-16 23:45:11    阅读次数:183
STL algorithm算法is_heap和is_heap_until(25)
is_heap原型: std::is_heap default (1) template bool is_heap (RandomAccessIterator first, RandomAccessIterator last); custom (2) template bool is_heap (RandomAccessI...
分类:其他好文   时间:2014-09-16 17:31:24    阅读次数:202
“浅析kmp算法”
“浅析kmp算法” By 钟桓  9月 16 2014 更新日期:9月 16 2014 文章目录 1. 暴力匹配:2. 真前缀和真后缀,部分匹配值3. 如何使用部分匹配值呢?4. 寻找部分匹配值5. 拓展 5.1. 最小覆盖字串 6. 参考资料 首先,KMP是一个字符串匹配算法,什么是字符串匹配呢?简单地说,有一个字符串“BBC ABCDAB ABCDABCDABDE...
分类:其他好文   时间:2014-09-16 17:29:20    阅读次数:414
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!