码迷,mamicode.com
首页 >  
搜索关键字:greedy    ( 311个结果
Codeforces Round #283 (Div. 2) c
/** ?*?@brief?Codeforces?Round?#283?(Div.?2)?c ?*?@file?c.cpp ?*?@author?mianma ?*?@created?2014/12/22?13:38 ?*?@edited??2014/12/22?13:38 ?*?@type?greedy ?*?@time?cost?...
分类:其他好文   时间:2014-12-22 14:38:11    阅读次数:251
正则表达式
java中的正则位于java.util.regex包中,这个包中只有一个MatchResult接口和Matcher、Pattern两个类。 正则中的数量词有Greedy (贪婪)、Reluctant(懒惰)和Possessive(强占)三种Greedy 数量词X?X,一次或一次也没有X*X,零次或多...
分类:其他好文   时间:2014-12-22 10:38:33    阅读次数:154
[LeetCode]Gas Station
There are N gas stations along a circular route, where the amount of gas at station i is gas[i]. You have a car with an unlimited gas tank and it costs cost[i] of gas to travel from station i to ...
分类:其他好文   时间:2014-12-13 09:39:54    阅读次数:182
Dijkstra单源最短路径(贪心选择)
贪心算法(又称贪婪算法Greedy):在对问题求解时,总是做出在当前看来是最好的选择。仅是在某种意义上的局部最优解。贪心算法不是对所有问题都能得到整体最优解,但对范围相当广泛的许多问题他能产生整体最优解或者是整体最优解的近似解。可用贪心算法求解的问题一般有两个重..
分类:其他好文   时间:2014-12-10 18:17:12    阅读次数:161
[LeetCode]Best Time to Buy and Sell Stock II
Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You may complete as many transactions as you like (ie, buy on...
分类:其他好文   时间:2014-12-09 17:55:38    阅读次数:194
【LeetCode】Jump Game II 解题报告
【题目】 Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array represents your maximum jump length at that position. Y...
分类:其他好文   时间:2014-12-09 17:46:14    阅读次数:133
Codeforces Round #279 (Div. 2) d
/** ?*?@brief?Codeforces?Round?#279?(Div.?2)?d ?*?@file?d.cpp ?*?@author?面码 ?*?@created?2014/12/09?10:58 ?*?@edited??2014/12/09?10:58 ?*?@type?math?greedy ?*?@note?自...
分类:其他好文   时间:2014-12-09 12:32:51    阅读次数:161
【LeetCode】Jump Game 解题报告
【题目】 Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array represents your maximum jump length at that position. D...
分类:其他好文   时间:2014-12-09 10:37:18    阅读次数:114
1.1.4 PROB Greedy Gift Givers
Greedy Gift GiversA group of NP (2 ≤ NP ≤ 10) uniquely named friends has decided to exchange gifts of money. Each of these friends might or might not ...
分类:其他好文   时间:2014-11-30 13:49:47    阅读次数:302
Codeforces Round #277.5 (Div. 2) c
/** ?*?@brief?Codeforces?Round?#277.5?(Div.?2)?c ?*?@file?c.c ?*?@author?面码 ?*?@created?2014/11/19?11:47 ?*?@edited??2014/11/19?11:47 ?*?@type?greedy ?*/ #include?<st...
分类:其他好文   时间:2014-11-19 12:44:12    阅读次数:229
311条   上一页 1 ... 25 26 27 28 29 ... 32 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!