1 #include 2 #include 3 #include "printCollection.h" 4 5 using namespace std; 6 7 /** 8 * Return the maximum item in array a. 9 *Assume a.size(...
分类:
其他好文 时间:
2014-07-22 22:51:38
阅读次数:
203
配置建议: 1. ????In MR1, the mapred.tasktracker.map.tasks.maximum and mapred.tasktracker.reduce.tasks.maximum properties dictated how many map and reduce slots each TaskTracker had. ????T...
分类:
其他好文 时间:
2014-07-21 10:14:00
阅读次数:
279
这题目,,,真是。。。诶。坑了好久。给一个有向图。U->V表示U可以打败V并得一分。如果一个人的得分最高,或者他打败所有比自己得分高的人,那么此人就是king。现在给出每个人的得分,求最多可能有多少个king同时存在。可以证明,如果有k个人是king,那么至少有一种分配方案使得这k个king都是分数...
分类:
其他好文 时间:
2014-07-19 16:09:34
阅读次数:
208
class Solution {public: int maxSubArray(int A[], int n) { int cur_sum = 0; int max_sum = INT_MIN; for (int i=0; i max_...
分类:
其他好文 时间:
2014-07-19 15:18:15
阅读次数:
160
说起backlog, 都会想起socket编程中的listen backlog 参数,而这个backlog 是linux内核中处理的backlog么?
int listen(int sockfd, int backlog)man listen
可以看到关于listen 的解释
The backlog argument defines the maximum length to wh...
分类:
系统相关 时间:
2014-07-19 02:44:36
阅读次数:
534
GoldenGate进程 abend,报错为OGG-00868 ORA-02396: Exceeded Maximum Idle Time, Please Connect Again...
分类:
其他好文 时间:
2014-07-18 14:03:15
阅读次数:
273
感觉动态规划很模糊,怎么办呢???
狂刷题吧!!!!!!!!!!!!!!!!!!!!!!!!!
1.POJ 2479 Maximum sum
首刷水题!!!!
双向统计最大和。
AC代码如下:
#include
#include
#include
#define inf -1000000000
using namespace std;
int main()
{
int ...
分类:
其他好文 时间:
2014-07-18 12:37:39
阅读次数:
228
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...
分类:
其他好文 时间:
2014-07-17 23:27:12
阅读次数:
216
题目;uva10827-Maximum sum on a torus(矩阵最大和的变形)
题目大意:就是uva108的变形,矩阵能够连通,就是可以从后面连到前面。这里把矩阵复制三遍,然后重新生成一个大的矩阵,就可以解决联通的问题。再枚举矩阵的起点和终点所有情况,保留最大值就可以了。
例如:1 2 3
2 3 4
新的矩阵: 1 2 3 1 2 3
...
分类:
其他好文 时间:
2014-07-17 19:36:02
阅读次数:
201
题目;uva108 Maximum sum(矩阵最大和)
题目大意:给出一个n*n的矩阵,求这个矩阵的最大和。这个矩阵不是连通的,只能在这个矩阵内找子矩阵,不能越过边界。
解题思路:枚举起点和终点,每个起点和终点就是一个矩阵,每个矩阵都算矩阵和,然后保留最大值。每个矩阵的值只要横着相加一遍,再竖着相加一遍,就可以得出以这个矩阵为起点的所有的子矩阵的和(这里可以直接要这个矩阵的和...
分类:
其他好文 时间:
2014-07-17 19:26:05
阅读次数:
194