码迷,mamicode.com
首页 >  
搜索关键字:discounts ciga buy cheap ciga    ( 1427个结果
uva 10090 Marbles
Problem FMarblesInput:standard inputOutput:standard outputI have some (say,n) marbles (small glass balls) and I am going to buy some boxes to store th...
分类:其他好文   时间:2014-05-26 14:45:04    阅读次数:319
Post These Up-Close Shots Of The Runway Bags
Here are some tips to guide you while shopping discount LV bags online. Look at the rack bag. Before you go out and buy handbags online, it is good to...
分类:其他好文   时间:2014-05-26 10:26:29    阅读次数:279
Choose For New Trainers Online Shop
Hello every body, cheapnikeairtrainers.co.uk are doing Spring Promotion! A hug number of Cheap Air Max trainers high quality trainers with cheap price...
分类:其他好文   时间:2014-05-26 10:19:28    阅读次数:253
【leetcode】Best Time to Buy and Sell Stock III
题目:这个题目里要求最多交易2次。也就是说可以只交易一次,不交易也可以。 分析:将整个交易序列分割成两部分,求出这样的一种分割,使得两部分连续子序列的和相加的结果最大,当然,如果不进行分割,就是求出整个序列的最大连续子序列的和。 那么分割点就可能是任意位置。找出取得最大值的分割点,返回最大值。 int maxProfit(vector &prices) { const int le...
分类:其他好文   时间:2014-05-24 20:54:57    阅读次数:402
【leetcode】Best Time to Buy and Sell Stock II
问题:股票交易,交易的次数不限,但是要求在购买新的股票前,必须将旧的股票卖出,即同一时间,最多只能持有一只股票。要求在给定的交易价格序列中,计算出最大的收益。 分析: 保证利润最大,就要求在局部的价格波动中,能在低价买进,高价卖出,也就是说,找个价格走势的递增区间,并且这里可以交易多次,所以可以找到多个价格走势的递增区间,所有区间的收益的和就是最大的利润。 再看下不完全是递增区间的...
分类:其他好文   时间:2014-05-24 19:49:02    阅读次数:349
LeetCode Best Time to Buy and Sell Stock
class Solution {public: int maxProfit(vector &prices) { int len = prices.size(); if (len maxv) { maxv = cur; ...
分类:其他好文   时间:2014-05-22 05:09:49    阅读次数:256
Learn Branch Prediction From SimpleScalar Source (1)
作为一名CSer,最好的学习方式之一无疑是tracing code,看源代码——不知你此时是否与我一样想起了Linus那句名言「talk is cheap, show me the fucking code!」?可是对计算机体系结构来说,很多技术直接是由硬件实现的,因而也被蒙上一层神秘的面纱。好在还...
分类:其他好文   时间:2014-05-21 23:46:56    阅读次数:307
Best Time to Buy and Sell Stock III
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-05-21 17:27:55    阅读次数:252
leetcode Best Time to Buy and Sell Stock III
思路:知道要用DP做,但是一开始思路是错的。后来参考了http://blog.csdn.net/pickless/article/details/12034365才意识到可以在整个区间的每一点切开,然后分别计算左子区间和右子区间的最大值,然后再用O(n)时间找到整个区间的最大值。看来以后碰到与2相关...
分类:其他好文   时间:2014-05-19 14:13:38    阅读次数:286
hdu2844
题目链接: 点击打开链接 题目: Whuacmers use coins.They have coins of value A1,A2,A3...An Silverland dollar. One day Hibix opened purse and found there were some coins. He decided to buy a very nice watch...
分类:其他好文   时间:2014-05-18 15:56:34    阅读次数:264
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!