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 ...
分类:
其他好文 时间:
2014-12-30 21:52:44
阅读次数:
198
/*----------------------------index.html------------------------------------*/ Shopping list What to buy Don't forgrt to buy this stuff. A tin of b...
分类:
其他好文 时间:
2014-12-29 22:56:25
阅读次数:
288
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...
分类:
其他好文 时间:
2014-12-28 18:12:08
阅读次数:
170
Description: 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 .....
分类:
其他好文 时间:
2014-12-28 00:25:48
阅读次数:
147
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),...
分类:
其他好文 时间:
2014-12-26 16:41:15
阅读次数:
136
题目:
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 ...
分类:
编程语言 时间:
2014-12-25 16:25:25
阅读次数:
146
题意:
给n个数,求它的最长下降子序列长度和数量。
分析:
dp,计数的时候要避免重复计数。
代码:
//poj 1952
//sep9
#include
using namespace std;
const int maxN=5012;
int a[maxN];
int dp[maxN];
int num[maxN];
int main()
{
int i,j,n,ans=0,an...
分类:
其他好文 时间:
2014-12-24 14:46:55
阅读次数:
182
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-12-24 11:20:46
阅读次数:
184
There is no doubt that it is expensive to buy a luxury car like Porsche. But sometime, its repair bill will cost you much more. Most Porsche owners ha...
分类:
其他好文 时间:
2014-12-22 17:34:28
阅读次数:
142
为当前用户创建cron服务 1. ?键入 crontab? -e 编辑crontab服务文件 ???? ?例如 文件内容如下: ??? ?*/2 * * * * /bin/sh /home/admin/jiaoben/buy/deleteFile.sh? ???? 保存文件并并退出 ???...
分类:
系统相关 时间:
2014-12-22 16:26:32
阅读次数:
277