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
What's xxxThe EM algorithm is used to find the maximum likelihood parameters of a statistical model in cases where the equations cannot be solved dire...
分类:
其他好文 时间:
2014-07-21 10:01:10
阅读次数:
243
http://www.csie.ntnu.edu.tw/~u91029/Matching.html 1 int nx,ny; 2 int mx[N],my[N]; 3 bool vy[N]; 4 bool g[N][N]; 5 6 int decode(int x,int y) {return...
分类:
其他好文 时间:
2014-07-21 09:38:46
阅读次数:
210
Say you have an array for which theithelement is the price of a given stock on dayi.Design an algorithm to find the maximum profit. You may complete a...
分类:
其他好文 时间:
2014-07-20 21:33:36
阅读次数:
204
今天做了三道LeetCode上的简单题目,每道题都是用c++和Python两种语言写的,因为c++版的代码网上比较多,所以就只分享一下Python的代码吧,刚学完Python的基本语法,做做LeetCode的题目还是不错的,对以后找工作面试也有帮助!
刚开始就从AC率最高的入手吧!
1.Given an array of integers, every element appe...
分类:
编程语言 时间:
2014-07-20 15:27:41
阅读次数:
262
这题目,,,真是。。。诶。坑了好久。给一个有向图。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
感觉动态规划很模糊,怎么办呢???
狂刷题吧!!!!!!!!!!!!!!!!!!!!!!!!!
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