码迷,mamicode.com
首页 >  
搜索关键字:maximum number of th    ( 33896个结果
LeetCode "Merge Sorted Array"
My first reaction: move all A elements back by n positions, and start everything from A[0] and B[0]. But a smarter idea is to start everything from th...
分类:其他好文   时间:2014-07-22 00:35:36    阅读次数:189
Asterisk 源代码解析之SIP呼叫
下图是asterisk的呼叫流程图: 我们以sip的呼叫过程为例来描述,其他channel的呼叫过程基本类似。 Astersik下注册的sip用户主动发起一个呼叫的函数调用过程(incoming)如下:  do_monitor->sipsock_read->handle_request->handle_request_invite->sip_new/ast_pbx_start->pbx_th...
分类:其他好文   时间:2014-07-22 00:27:37    阅读次数:294
poj 3693 Maximum repetition substring(有点麻烦的后缀数组)
Maximum repetition substring Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 6638   Accepted: 2007 Description The repetition number of a string is defined a...
分类:其他好文   时间:2014-07-21 11:35:34    阅读次数:244
LeetCode "Maximum Subarray"
Very classic problem. You can brush up your DP and Searching skills.DP:class Solution {public: int maxSubArray(int A[], int n) { // dp[i + 1...
分类:其他好文   时间:2014-07-21 11:06:21    阅读次数:216
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 le...
分类:其他好文   时间:2014-07-21 09:07:24    阅读次数:207
ACdream1092
题意是给出某个地鼠的出现位置以及出现时间,人有一个移动速度,求此人最多可以打多少个地鼠?我们根据时间把所有的地鼠排序,如果两个地鼠之间的距离不超过时间只差与速度的乘积,那说明打完上一只地鼠还可以打到这一只地鼠。直接f[i]表示打完第i只地鼠且此时在i地鼠位置的期望,DP即可。召唤代码君:/** th...
分类:其他好文   时间:2014-07-21 08:04:50    阅读次数:221
HDU 4608 I-number--简单模拟
I-number Time Limit: 5000ms   Memory limit: 65536K  有疑问?点这里^_^ 题目描述 The I-number of x is defined to be an integer y, which satisfied the the conditions below: 1.  y>x; 2.  the sum of each...
分类:其他好文   时间:2014-07-20 23:24:13    阅读次数:298
discuz 限制只能中文注册用户名称
1:修改uc_client\model\user.phpfunction check_username($username) { $guestexp = '\xA1\xA1|\xAC\xA3|^Guest|^\xD3\xCE\xBF\xCD|\xB9\x43\xAB\xC8'; $len = $th...
分类:其他好文   时间:2014-07-20 22:01:28    阅读次数:214
ZOJ3543 Number String 动态规划
ZOJ3543 Number String状态f[i][j]表示长度为I的全排列,符合字符串的要求,最后一位数字是j的方案数。重点在要始终保持是f算的排列的数量,然后转移时用这些推出来新的情况。就是j#include #include using namespace std;const long l...
分类:其他好文   时间:2014-07-20 21:39:23    阅读次数:230
【leetcode刷题笔记】Best Time to Buy and Sell Stock III
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
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!