假设你有一个数组,它的第i个元素是一个股票在一天的价格。
设计一个算法,找出最大的利润。...
分类:
其他好文 时间:
2014-10-04 16:57:46
阅读次数:
122
3394: [Usaco2009 Jan]Best Spot 最佳牧场Time Limit:1 SecMemory Limit:128 MBSubmit:11Solved:9[Submit][Status]DescriptionInput第1行输入三个整数P,FC.之后F行每行输入一个整数表示一个贝...
分类:
其他好文 时间:
2014-10-04 02:35:05
阅读次数:
336
Shaolin
Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d
& %I64u
Submit Status Practice HDU
4585
Description
Shaolin temple is very famous for its Kongfu monks.A...
分类:
其他好文 时间:
2014-10-04 01:09:25
阅读次数:
391
题目Say you have an array for which theithelement is the price of a given stock on dayi.Design an algorithm to find the maximum profit. You may complete...
分类:
其他好文 时间:
2014-10-03 13:37:34
阅读次数:
225
3300: [USACO2011 Feb]Best ParenthesisTime Limit:10 SecMemory Limit:128 MBSubmit:89Solved:42[Submit][Status]DescriptionRecently, the cows have been com...
分类:
其他好文 时间:
2014-10-03 13:23:44
阅读次数:
356
Say you have an array for which theithelement is the price of a given stock on dayi.Design an algorithm to find the maximum profit. You may complete a...
分类:
其他好文 时间:
2014-10-02 13:58:53
阅读次数:
321
Why, every fault’s condemn’d ere it be done:Mine were the very cipher of a function. . .—William Shakespeare, Measure for MeasureThe best thing about ...
分类:
编程语言 时间:
2014-10-01 14:47:31
阅读次数:
190
时代在进步,原本前端只是用来简单的数据显示以及提交数据到后端处理逻辑的地方,而随着SPA的发展,前端的逻辑也越来越是庞大,恰巧,今天看微博的时候,发现一个概念讨论的比较多,就是 Web Components,顺藤摸瓜,做了一些了解,发现 Polymer 这样一个或许是未来的东东,至少有一点,ch.....
分类:
Web程序 时间:
2014-10-01 12:11:11
阅读次数:
435
题目信息:
1016. Phone Bills (25)
时间限制
400 ms
内存限制
32000 kB
代码长度限制
16000 B
判题程序
Standard
作者
CHEN, Yue
A long-distance telephone company c...
分类:
其他好文 时间:
2014-10-01 02:32:10
阅读次数:
229
给定长度为N的字符串S,构造长度为N的字符串T,起初T是空串,反复从S的头部或者尾部删除一个字符,加到T的尾部。目标是构造字典序尽可能小的T。尝试如下贪心算法:不断取S头部和尾部较小的字符放到T的尾部。考虑S头部和尾部字符相同的情况。有如下算法:按照字典序比较S和将S反转后的字符串S‘;如果S较小,...
分类:
其他好文 时间:
2014-09-30 20:28:10
阅读次数:
207