//一个无向图,两点之间的流量为c,两点花的时间为t
//问从起点到终点n之间时间小于等于T且只走一条路径能够运输的最大流量为多少
//二分流量,小于这个流量的路径不走,求其时间是否小于等于T得到答案
#include
#include
#include
#include
using namespace std ;
const in...
分类:
其他好文 时间:
2015-08-01 14:18:53
阅读次数:
117
该题的思路是使用辅助数组来保存从前向后和从后向前到当前位置的最大最小值,这样就可以通过每一个位置处的最大最小值来计算该位置的结果,最后在所有结果中选出最大的值即可。
int maxDiffSubArrays(vector nums) {
// write your code here
int size = nums.size();
/...
分类:
其他好文 时间:
2015-07-31 18:22:21
阅读次数:
110
Givennpoints on a 2D plane, find the maximum number of points that lie on the same straight line.需考虑3类特殊情况:1、x1=x2,斜率无穷大;2、x1=x2,y1=y2,相同点也要计数,当计算最终结果...
分类:
其他好文 时间:
2015-07-31 17:41:36
阅读次数:
82
Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest le...
分类:
其他好文 时间:
2015-07-31 16:08:47
阅读次数:
103
TCP MSL && TTL MSL 是Maximum Segment Lifetime英文的缩写,中文可以译为“报文最大生存时间”,他是任何报文在网络上存在的最长时间,超过这个时间报文将被丢弃。因为tcp报文 (segment)是ip数据报(datagram)...
分类:
其他好文 时间:
2015-07-31 13:14:30
阅读次数:
571
2014-12-18 03:21:03 Starting to launch local task to process map join; maximum memory = 10654842882014-12-18 03:21:08 Processing rows: 200000 Hashtabl...
分类:
其他好文 时间:
2015-07-31 12:34:08
阅读次数:
322
DescriptionGiven a sequence of integers S = {S1, S2, . . . , Sn}, you should determine what is the value of the maximum positive product involving con...
分类:
其他好文 时间:
2015-07-30 22:46:10
阅读次数:
105
Find the contiguous subarray within an array (containing at least one number) which has the largest product. For example, given the a...
分类:
其他好文 时间:
2015-07-30 18:36:07
阅读次数:
107
1.Sliding Window Maximum 1 class Solution { 2 public: 3 vector maxSlidingWindow(vector &nums, int k) { 4 deque dq; 5 vector res; 6...
分类:
其他好文 时间:
2015-07-30 18:27:08
阅读次数:
96
地址:http://blog.csdn.net/z287438743z/article/details/8132806RMQ(Range Minimum/Maximum Query)问题就是求区间最值问题。这里要仔细分析的是ST算法,它可以做到O(nlogn)的预处理,O(1)回答每个询问。网上看了...
分类:
编程语言 时间:
2015-07-30 11:10:53
阅读次数:
155