Leetcode 经典题 Best Time to Buy and Sell Stock III...
分类:
其他好文 时间:
2014-09-20 20:40:19
阅读次数:
208
Problem Description
Corrupt governors always find ways to get dirty money. Paint something, then sell the worthless painting at a high price to someone who wants to bribe him/her on an auction, this ...
分类:
其他好文 时间:
2014-09-20 20:23:09
阅读次数:
289
Leetcode 经典题Best Time to Buy and Sell Stock||...
分类:
其他好文 时间:
2014-09-20 14:05:47
阅读次数:
155
Leetcode 经典题 Best Time to Buy and Sell Stock...
分类:
其他好文 时间:
2014-09-20 10:02:17
阅读次数:
126
题意 :总共n个人,一个一个的来排队,每个人都有一个要求,要求排到第几个人后面(当然肯定是最后面来的人的要求先满足),每个人有一个对应的val,按顺序输出n的人的val。用线段树来维护区间剩余的位置数量,,当然必须从最后一个人向前来更新线段树,每次更新之后就把该位置的剩余数量置为0(因为后面的人的要...
分类:
其他好文 时间:
2014-09-20 01:03:16
阅读次数:
144
The new ITone 6 has been released recently and George got really keen to buy it. Unfortunately, he didn't have enough money, so George was going to work as a programmer. Now he faced the following pro...
分类:
其他好文 时间:
2014-09-19 23:56:06
阅读次数:
254
题目链接:poj 2828 Buy Tickets
题目大意:给定N,表示有个人,给定每个人站入的位置,以及这个人的权值,现在按队列的顺序输出每个人的权值。
解题思路:第K大元素,很巧妙,将人入队的顺序倒过来看,就是纯第K大问题,然后用树状数组还是线段树就都可以做了。
C++ 线段树#include
#include
#include
using namespace std;...
分类:
其他好文 时间:
2014-09-18 19:03:14
阅读次数:
196
Ann has recently started commuting by subway. We know that a one ride subway ticket costs
a rubles. Besides, Ann found out that she can buy a special ticket for
m rides (she can buy it several times...
分类:
其他好文 时间:
2014-09-15 10:05:28
阅读次数:
320
CREATE OR REPLACE PROCEDURE PR_MOD_BASE IScursor c_base ISSELECT MIN(INVENTORY_DATE) IDATE,KUNNR,MATNR FROM STOCK_BASE_DATA GROUP BY TO_CHAR(INVENTORY...
分类:
数据库 时间:
2014-09-12 14:59:03
阅读次数:
236