问题: 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 co...
分类:
其他好文 时间:
2014-10-12 00:58:36
阅读次数:
686
有一组数组代表股票的价格一次买一次卖如何得到最大利润? 1 public int maxProfit(int[] prices) { 2 if(prices.length==0)return 0; 3 int maxProfit=0; 4 in...
分类:
编程语言 时间:
2014-10-11 22:08:36
阅读次数:
174
N - Frequency Hopping
Time Limit:10000MS
Memory Limit:0KB 64bit IO Format:%lld & %llu
Submit
Status
Practice
UVA 11248
Appoint description:
Description
E
...
分类:
其他好文 时间:
2014-10-11 20:39:46
阅读次数:
254
1) Best Cross Platform IDE -
Brackets
Brackets是一个在前端Web开发和设计人员中最流行的开放源码IDE/代码编辑器之一。它拥有一些实用工具能够将HTML 和CSS推送至浏览,而不需要保存或重新加载页面。这是一个强大的工具,你将会爱上在Bracket中编写代码。
2) Best Cross Platform IDE -
Light Tab...
分类:
Web程序 时间:
2014-10-11 08:25:45
阅读次数:
281
用户退出应用前给出一个提示是很有必要的,因为可能是用户并不真的想退出,而只是一不小心按下了返回键,大部分应用的做法是在应用退出去前给出一个Dialog,我觉得这样不太友好,用户还得移动手指去按dialog中的按钮。个人觉得“再按一次返回键退出程序”是best practice,实现也很简单,直接上代...
分类:
移动开发 时间:
2014-10-11 01:47:44
阅读次数:
241
为了在IDEA中编写scala,今天安装配置学习了IDEA集成开发环境。IDEA确实很优秀,学会之后,用起来很顺手。关于如何搭建scala和IDEA开发环境,请看文末的参考资料。用Scala和Java实现WordCount,其中Java实现的JavaWordCount是spark自带的例子($SPA...
分类:
编程语言 时间:
2014-10-10 23:51:34
阅读次数:
528
大道至简Any intelligent fool can make things bigger and more complex. It takes a touch of genius – and a lot of courage – to move in the opposite directio...
分类:
其他好文 时间:
2014-10-10 21:34:04
阅读次数:
174
#include#include#include#include#define MAX 102void read();using namespace std;int map[MAX][MAX],best[MAX],n;bool visit[MAX];int main(){ //freopen(...
分类:
其他好文 时间:
2014-10-10 12:47:34
阅读次数:
172
One of our best friends is getting married and we all
are nervous because he is the first of us who is doing
something similar. In fact, we have never assisted
to a wedding, so we have no clothes o...
分类:
其他好文 时间:
2014-10-10 01:16:33
阅读次数:
274
问题: 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 co...
分类:
其他好文 时间:
2014-10-10 00:18:11
阅读次数:
398