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), des...
分类:
其他好文 时间:
2015-03-29 13:41:22
阅读次数:
186
OpenCV is the most popular and advanced code library for Computer Vision related applications today, spanning from many very basic tasks (capture and ...
分类:
系统相关 时间:
2015-03-29 13:37:17
阅读次数:
186
Problem Description
XX星有许多城市,城市之间通过一种奇怪的高速公路SARS(Super Air Roam Structure---超级空中漫游结构)进行交流,每条SARS都对行驶在上面的Flycar限制了固定的Speed,同时XX星人对 Flycar的“舒适度”有特殊要求,即乘坐过程中最高速度与最低速度的差越小乘坐越舒服 ,(理解为SARS的限速要求,flycar必须瞬间提速/降速,痛苦呀 ),
但XX星人对时间却没那么多要求。要你找出一条城市间的最舒适的路径。(SARS是双向的)。
...
分类:
其他好文 时间:
2015-03-29 12:21:31
阅读次数:
150
题目:
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 ...
分类:
其他好文 时间:
2015-03-29 12:21:10
阅读次数:
210
题目:
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 at most two transactions.
Note...
分类:
其他好文 时间:
2015-03-29 12:14:11
阅读次数:
150
1 // random.cpp -- random access to a binary file 2 #include // not required by most systems 3 #include 4 #include 5 #include // (o...
分类:
编程语言 时间:
2015-03-29 09:24:23
阅读次数:
159
代码:#include#includeusing namespace std;int maxArea(vector &height){ int L = height.size(); int i = 0; int j = L - 1; int max = 0; int l...
分类:
其他好文 时间:
2015-03-28 20:22:35
阅读次数:
132
OpenCV is the most popular and advanced code library for Computer Vision related applications today, spanning from many very basic tasks (capture and ...
分类:
系统相关 时间:
2015-03-28 12:50:19
阅读次数:
255
题目链接:container-with-most-water
/**
*
Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai).
n vertical lines are drawn such that the two endpoi...
分类:
其他好文 时间:
2015-03-28 08:59:02
阅读次数:
147
Biker's Trip Odometer
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 4745 Accepted Submission(s): 3144
Problem Description
Most bic...
分类:
其他好文 时间:
2015-03-22 09:22:41
阅读次数:
194