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
Best Time to Buy and Sell Stock I
只能作一次操作时:维护preMin记录之前出现的最小值
代码如下:
int maxProfit(vector &prices) {
if (prices.size() == 0) return 0;
int profit = 0;
int preMin = prices...
分类:
其他好文 时间:
2014-10-10 00:02:08
阅读次数:
204
题意:一些机枪彼此不能在同一行和同一列,但是由于有墙的阻隔,能保证子弹无法穿透,即可以同行同列,现问如果说给了一个n*n(n#include using namespace std;int n,best;char map[4][4];int canput(int row,int col){ int....
分类:
其他好文 时间:
2014-10-09 22:10:47
阅读次数:
233
Let's dance in style让我们翩然起舞Let's dance for a while让我们尽情欢笑Heaven can wait天堂也得等著我们We're only watching the skies我们只是仰望凝视著天空Hoping for the best愿望有最好的结果But...
分类:
其他好文 时间:
2014-10-09 21:44:07
阅读次数:
178
JSTL 的 if else : 有 c:if 没有 else 的处理 <c:choose> <c:when test=""> ? ?如果 </c:when> <c:otherwise> ?否则 </c:otherwise> </c:choose>...
分类:
Web程序 时间:
2014-10-09 16:44:38
阅读次数:
246
/**
* 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 transactions as you like
* ...
分类:
其他好文 时间:
2014-10-07 11:10:03
阅读次数:
129
原题地址: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 sto...
分类:
编程语言 时间:
2014-10-06 23:54:02
阅读次数:
266
Alpha是图形界面开发中常用的特效,通常我们会使用以下代码来实现Alpha特效:view.setAlpha(0.5f);View.ALPHA.set(view, 0.5f);ObjectAnimator.ofFloat(view, "alpha", 0.5f).start();view.anima...
分类:
其他好文 时间:
2014-10-06 17:55:30
阅读次数:
160
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 complet...
分类:
其他好文 时间:
2014-10-06 14:52:50
阅读次数:
220