码迷,mamicode.com
首页 >  
搜索关键字:cigarette coup buy cheap luck    ( 1603个结果
leetcode_121_Best Time to Buy and Sell Stock
版权所有,欢迎转载,转载请注明出处,谢谢 Say you have an array for which the ith element is the price of a given stock on day i. If you were only permitted to complete at most one transaction (ie, buy one and sel...
分类:其他好文   时间:2015-02-06 13:22:16    阅读次数:121
Best Time to Sell and Buy Stock
这道题想了很多,但是想多了。这个题思路很简单,如果当前值大于最小值,就计算差,和最大利润值比较。 1 class Solution { 2 public: 3 int maxProfit(vector &prices) { 4 if(prices.size()==0) 5 ...
分类:其他好文   时间:2015-02-04 21:34:21    阅读次数:120
HDU 1847 Good Luck in CET-4 Everybody!(SG的简单运用)
HDU 1847 Good Luck in CET-4 Everybody!(SG的简单运用)...
分类:其他好文   时间:2015-02-04 20:27:53    阅读次数:148
LeetCode—Best Time to Buy and Sell Stock
Say you have an array for which the ith element is the price of a given stock on day i. If you were only permitted to complete at most one transaction (ie, buy one and sell one share of the stock),...
分类:其他好文   时间:2015-02-04 18:49:28    阅读次数:123
poj 2828 Buy Tickets 万能的线段树大法。
Railway tickets were difficult to buy around the Lunar New Year in China, so we must get up early and join a long queue… The Lunar New Year was approaching, but unluckily the Little Cat still had schedules going here and there. Now, he had to travel by tra...
分类:其他好文   时间:2015-02-03 09:37:13    阅读次数:222
leetcode------Best Time to Buy and Sell Stock II
标题:Best Time to Buy and Sell Stock II通过率:37.3%难度:中等Say you have an array for which theithelement is the price of a given stock on dayi.Design an algor...
分类:其他好文   时间:2015-02-02 12:28:59    阅读次数:124
leetcode------Best Time to Buy and Sell Stock
标题:Best Time to Buy and Sell Stock通过率:32%难度:中等Say you have an array for which theithelement is the price of a given stock on dayi.If you were only per...
分类:其他好文   时间:2015-02-02 12:18:58    阅读次数:138
leetcode 【 Best Time to Buy and Sell Stock II 】python 实现
题目: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 complet...
分类:编程语言   时间:2015-02-01 10:46:16    阅读次数:251
leetcode 【 Best Time to Buy and Sell Stock 】python 实现
思路:Say you have an array for which theithelement is the price of a given stock on dayi.If you were only permitted to complete at most one transaction ...
分类:编程语言   时间:2015-01-31 21:47:24    阅读次数:180
(中等) HDU 4979 A simple math problem. , DLX+重复覆盖+打表。
Description Dragon loves lottery, he will try his luck every week. One day, the lottery company brings out a new form of lottery called accumulated...
分类:其他好文   时间:2015-01-31 14:33:10    阅读次数:190
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!