/**
?*?@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
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
贪心算法(又称贪婪算法Greedy):在对问题求解时,总是做出在当前看来是最好的选择。仅是在某种意义上的局部最优解。贪心算法不是对所有问题都能得到整体最优解,但对范围相当广泛的许多问题他能产生整体最优解或者是整体最优解的近似解。可用贪心算法求解的问题一般有两个重..
分类:
其他好文 时间:
2014-12-10 18:17:12
阅读次数:
161
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
【题目】
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
/**
?*?@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
【题目】
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
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
/**
?*?@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