码迷,mamicode.com
首页 >  
搜索关键字:maximum repetition s    ( 4177个结果
【RMQ】【Sparse_Table算法】
定义:RMQ(Range Minimum/Maximum Query),即区间最值查询,是指这样一个问题: 对于长度为n的数列A,回答若干询问RMQ(A,i,j) (i,jO(nlogn)*/2 void initRMQ(int n)3 {4 for(int i = 1; i (1 R)...
分类:编程语言   时间:2015-09-02 01:58:16    阅读次数:197
Maximum Random Walk(概率dp)
题意:走n步,给出每步向左走概率l,向右走概率r,留在原地的概率 1-l-r,求能达到的最远右边距离的期望。分析;开始按期望逆求的方式分析,但让求的就是右边界没法退,懵了一会,既然逆着不能求,就先正着求概率,再根据期望的定义来求,试试行吗,想了想状态,dp[i][j][k],表示走了i步当前位置是j...
分类:其他好文   时间:2015-09-02 00:22:48    阅读次数:177
Go内置函数cap
func cap(v Type) int返回指定类型的容量,根据不同类型,返回意义不同。数组: 元素个数 (和len(v)一样).数组指针: *v的元素个数 (和len(v)一样).Slice: the maximum length the slice can reach when resliced...
分类:其他好文   时间:2015-08-30 17:16:43    阅读次数:130
【原创】leetCodeOj --- Sliding Window Maximum 解题报告
天,这题我已经没有底气高呼“水”了。。。题目的地址:https://leetcode.com/problems/sliding-window-maximum/题目内容:Given an arraynums, there is a sliding window of sizekwhich is mov...
分类:Windows程序   时间:2015-08-30 15:30:08    阅读次数:335
[LeetCode][JavaScript]Longest Palindromic Substring
Longest Palindromic SubstringGiven a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there...
分类:编程语言   时间:2015-08-29 22:58:51    阅读次数:160
EM算法
EM算法本文试图用最简单的例子、最浅显的方式说明EM(Expectation Maximization)算法的应用场景和使用方法,而略去公式的推导和收敛性的证明。以下内容翻译自《Data-Intensive Text Processingwith MapReduce》。Maximum Likelih...
分类:编程语言   时间:2015-08-29 21:29:34    阅读次数:274
[LeetCode]Maximum Depth of Binary Tree
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 ...
分类:其他好文   时间:2015-08-29 16:48:03    阅读次数:173
reduce的数目到底和哪些因素有关
reduce的数目到底和哪些因素有关1、我们知道map的数量和文件数、文件大小、块大小、以及split大小有关,而reduce的数量跟哪些因素有关呢?设置mapred.tasktracker.reduce.tasks.maximum的大小可以决定单个tasktracker一次性启动reduce的数目...
分类:其他好文   时间:2015-08-28 21:18:34    阅读次数:278
HDU 1056.HangOver【水!水!水!】【8月28】
HangOver Problem Description How far can you make a stack of cards overhang a table? If you have one card, you can create a maximum overhang of half a card length. (We're assuming that the car...
分类:其他好文   时间:2015-08-28 19:52:20    阅读次数:130
统计学习方法 李航---第6章 逻辑回归与最大熵模型
第6章 逻辑回归与最大熵模型逻辑回归(logistic regression)是统计学习中的经典分类方法。最大嫡是概率模型学习的一个准则将其推广到分类问题得到最大熵模型(maximum entropymodel)。逻辑回归模型与最大熵模型都属于对数线性模型。6.1 逻辑回归模型定义6.1(逻辑分布)...
分类:其他好文   时间:2015-08-28 19:15:16    阅读次数:569
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!