本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/43155725
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 tr...
分类:
其他好文 时间:
2015-01-26 22:57:31
阅读次数:
180
Crazy Shopping(拓扑排序+完全背包)Because of the 90th anniversary of theCoherent & Cute Patchouli(C.C.P),Kawashiro Nitoridecides to buy a lot of rare things to...
分类:
编程语言 时间:
2015-01-26 20:57:38
阅读次数:
220
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 at most two transactions. Note: You may not eng...
分类:
编程语言 时间:
2015-01-26 13:45:27
阅读次数:
200
题意就是 给出一段插入,求出最后的序列。
做到n*logn基本都能过。
我用线段树做的。不过开始没想到怎么解决插入顺序问题,只知道存一个数组表示当前可以插入几个数。
后来ACdream群给了解答。每次update的时候,如果left的插入数大于插入就继续,否者就走right,并且将插入改为插入-left的插入数。
//PS 其实,觉得SBT应该能做的。
#include
...
分类:
其他好文 时间:
2015-01-26 13:45:03
阅读次数:
177
https://oj.leetcode.com/problems/best-time-to-buy-and-sell-stock-iii/Say you have an array for which theithelement is the price of a given stock on da...
分类:
其他好文 时间:
2015-01-25 22:12:13
阅读次数:
201
1. 实时数据eg. http://hq.sinajs.cn/list=sh601006具体可参考:http://www.cnblogs.com/me115/archive/2011/05/09/2040826.html2. 历史数据eg. http://q.stock.sohu.com/hisHq...
分类:
其他好文 时间:
2015-01-25 19:29:34
阅读次数:
164
Best Time to Buy and Sell Stock IISay you have an array for which theithelement is the price of a given stock on dayi.Design an algorithm to find the ...
分类:
其他好文 时间:
2015-01-25 19:26:04
阅读次数:
119
本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/43024967
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 o...
分类:
其他好文 时间:
2015-01-22 21:58:49
阅读次数:
219
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 (ie...
分类:
其他好文 时间:
2015-01-21 21:57:11
阅读次数:
174
破解补丁下载:amtlib.framework.zip
http://pan.baidu.com/share/link?shareid=982731132&uk=3071720681&app=zd
[buy]Adobe PhotoShop
CS6 for Mac(苹果)中文版破解方法:[/buy]
重申一遍下载完之后不要急着安装,先断网后再进行破解!...
分类:
系统相关 时间:
2015-01-21 18:12:27
阅读次数:
294