MTU是Maximum Transmission Unit的缩写,意为最大传输单元,通俗的理解就是在网络上传送的最大数据包,单位是字节。 以太网对数据帧的长度都有一个限制,其最大值为1500,这个特性被称作MTU,不同类型的网络大多数都有一个上限。如果IP层有一个IP包要传,而且数据的长度比链路.....
分类:
其他好文 时间:
2014-08-02 01:32:22
阅读次数:
1806
题意:从一个n*n的矩阵中找出和最大的子矩阵
思路:最大连续和的求解。我们可以将二维的转化为一维进行计算。sum[i][j]表示以(1, 1)和(i, j)为对角的矩阵的和。之后只要逐个枚举每个可能出现的值,保存最大值即可。
#include
#include
#include
#include
using namespace std;
const int INF ...
分类:
其他好文 时间:
2014-08-01 23:16:52
阅读次数:
283
题目地址:HDU 1839
我去。。原来这题这么简单。。。网络流中这种二分建图的方式做了一大堆了。。这种题还能难倒我吗。。。白天一直没怎么看懂题,对题意懵懵懂懂的。。。晚上好好看了看题,这不就是网络流中练的最多的那种二分建图模型吗。。。。只是把网络流算法改成最短路就行了。。但是两个地方手残了没能在实验室当场A掉。。sad。。。
这题就是二分最小容量,对满足容量的加边,对时间求最短路。如果最短时...
分类:
其他好文 时间:
2014-08-01 23:07:42
阅读次数:
283
问题:二叉树的最深深度class Solution{public: void dfs(TreeNode *root,int step,int &MAX) { if(root==NULL) { if(MAXleft,step+1); ...
分类:
其他好文 时间:
2014-08-01 22:49:02
阅读次数:
202
Greedy, Greedy, Greedy.. It is all about maximum interval update.One trick is, we start looping over each element from the one nearest to end to farth...
分类:
其他好文 时间:
2014-08-01 13:32:21
阅读次数:
283
Longest Palindromic SubstringGiven a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there...
分类:
其他好文 时间:
2014-08-01 04:47:25
阅读次数:
243
Maximum Depth of Binary TreeGiven a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root ...
分类:
其他好文 时间:
2014-07-31 23:19:10
阅读次数:
259
1.The use of state-observation transition functions rather than the separate transition and observation functions in HMMs allows us to model transitio...
分类:
其他好文 时间:
2014-07-31 20:43:27
阅读次数:
179
题目: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 farthes....
分类:
编程语言 时间:
2014-07-31 02:41:15
阅读次数:
229
Problem Description
Given an N * M matrix with each entry equal to 0 or 1. We can find some rectangles in the matrix whose entries are all 1, and we define the maximum area of such rectangle as thi...
分类:
移动开发 时间:
2014-07-30 20:48:34
阅读次数:
260