码迷,mamicode.com
首页 >  
搜索关键字:maximum    ( 4142个结果
[ACM] POJ 2479 Maximum sum (动态规划求不相交的两段子段和的最大值)
Maximum sum Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 33363   Accepted: 10330 Description Given a set of n integers: A={a1, a2,..., an}, we define a...
分类:其他好文   时间:2014-08-06 11:59:41    阅读次数:186
升级ubuntu中的gcc和g++版本
在利用张乐博士的最大熵模型工具包(Maximum Entropy Modeling Toolkit for Python and C++)和条件随机场的经典工具包CRF++(CRF++: Yet Another CRF toolkit)进行分词的时候,发现工具包不能正常安装,从报出的错误推测是gcc的版本较低,上述工具包发布于2011年,推测使用了较新的C++11标准。我们知道C++11标准开始支...
分类:其他好文   时间:2014-08-06 01:59:30    阅读次数:151
LeetCode——Maximum Subarray
Find the contiguous subarray within an array (containing at least one number) which has the largest sum. For example, given the array [?2,1,?3,4,?1,2,1,?5,4], the contiguous subarray [4,?1,2,1] ha...
分类:其他好文   时间:2014-08-05 22:37:50    阅读次数:188
LeetCode第五题,Longest Palindromic Substring
题目原文: Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique longest palindromic substring. 题意解析: 最长回文子串。就是...
分类:其他好文   时间:2014-08-05 15:56:59    阅读次数:290
滑动删除实现
<!DOCTYPEhtml> <html> <head> <metacharset="utf-8"> <metaname="viewport"content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=yes"> <title>TOUCH</title> <styletype="text/css"> *{ margin:..
分类:其他好文   时间:2014-08-05 14:26:11    阅读次数:275
Codeforces Round #259 (Div. 2) C - Little Pony and Expected Maximum (数学期望)
题目链接题意 : 一个m面的骰子,掷n次,问得到最大值的期望。思路 : 数学期望,离散时的公式是E(X) = X1*p(X1) + X2*p(X2) + …… + Xn*p(Xn)p(xi)的是所有最大值是xi的情况数/总情况数一共是m^n种,掷n次,所有最大值是xi的情况数应该是xi^n,但是这里...
分类:其他好文   时间:2014-08-05 10:44:59    阅读次数:217
Longest Palindromic Substring leetcode java
题目:Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique lo....
分类:编程语言   时间:2014-08-04 04:10:26    阅读次数:374
HDU 4002 Find the maximum(数论-欧拉函数)
HDU 4002 Find the maximum(数论-欧拉函数) 题目大意: 给定一个n,问你1~n中,求一个数 x 使得 x/φ(x) 的值最大。 解题思路: 根据欧拉函数的公式,φ(x)=x(1-1/p1)(1-1/p2)(1-1/p3)(1-1/p4)…..(1-1/pn) 则:x/φ(x)=p1/(p1-1)*p2/(p2-1)*......*pn/(pn-1) 可以看出项越多x/φ(x)越大,且因子越小x/φ(x)越大,那么只需要2*3*5*7.... 考虑到数字很大,所以用JAVA来写...
分类:其他好文   时间:2014-08-03 23:16:46    阅读次数:268
[LeetCode]Maximum Depth of Binary Tree
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 leaf node. /** * Definition for binary tree ...
分类:其他好文   时间:2014-08-02 23:32:04    阅读次数:232
复习图---Delay Constrained Maximum Capacity Path(SPFA+二分)
Delay Constrained Maximum Capacity Path Time Limit:10000MS     Memory Limit:65535KB     64bit IO Format:%I64d & %I64u Submit Status Description Consider an undirected graph with N vert...
分类:其他好文   时间:2014-08-02 18:31:43    阅读次数:313
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!