可以多次买卖的话,就可以利用累加效应,只要后面相邻值大于当前值,就可以获利,将差值作为最大获利值的一部分累加起来。最后结果即为最大获利值。 ...
分类:
其他好文 时间:
2018-05-18 20:14:21
阅读次数:
110
扫描一遍数组,用当前值减去之前的最小值,即为当前可获得的最大利润。扫描完毕后,即为买卖一次能获得的最大利润。 ...
分类:
其他好文 时间:
2018-05-18 19:24:17
阅读次数:
131
为当前用户创建cron服务 1. 键入 crontab -e 编辑crontab服务文件 例如 文件内容如下: */2 * * * * /bin/sh /home/admin/jiaoben/buy/deleteFile.sh 保存文件并并退出 */2 * * * * /bin/sh /home/a ...
分类:
系统相关 时间:
2018-05-17 00:53:52
阅读次数:
206
题目链接: https://cn.vjudge.net/problem/POJ-2828 题目大意: 插队的问题,每个案例给出n,代表有n个插队的,每个给出p,v,意思是代号为v的人插在了第p个人的后面,问最后的队伍的排列? 解题思路: 如果从前往后递推,每次插入在前面的话,后面的人都需要往后移动, ...
分类:
其他好文 时间:
2018-05-12 02:42:12
阅读次数:
166
1.新建ASP.NET Web应用程序, 选择Empty模板。 2.创建Stock.cs类 1 public class Stock 2 { 3 /// <summary> 4 /// 价格 5 /// </summary> 6 private decimal _price; 7 8 /// <su ...
分类:
其他好文 时间:
2018-05-11 20:04:38
阅读次数:
226
Problem Description Jack and Jill have decided to sell some of their Compact Discs, while they still have some value. They have decided to sell one of ...
分类:
其他好文 时间:
2018-05-05 21:47:38
阅读次数:
306
描述 Jack and Jill have decided to sell some of their Compact Discs, while they still have some value. They have decided to sell one of each of the CD t ...
分类:
其他好文 时间:
2018-05-05 20:46:32
阅读次数:
221
Problem Description There are a lot of trees in an area. A peasant wants to buy a rope to surround all these trees. So at first he must know the minim ...
分类:
其他好文 时间:
2018-05-03 01:05:21
阅读次数:
198
股票信息定向爬取 功能描述: 目标 获取上交所和深交所所有股票的名称和交易信息 输出 保存在文件中 技术路线 requests bs4 re 候选爬取网站: 新浪股票 http://finance.sina.com.cn/stock/ 百度股票 https://gupiao.baidu.com/st ...
分类:
其他好文 时间:
2018-05-02 02:54:22
阅读次数:
142
Can you sell yourself in two minutes? go for it with my qualifications and experience I feel i am hardworing responsible and diligent in any project i ...
分类:
其他好文 时间:
2018-05-01 20:21:21
阅读次数:
174