码迷,mamicode.com
首页 >  
搜索关键字:best sequence    ( 8496个结果
TCP 3次握手和四次挥手
1.建立一个连接需要三次握手:位码即tcp标志位,有6种标示:SYN(synchronous建立联机) ACK(acknowledgement 确认) PSH(push传送) FIN(finish结束) RST(reset重置) URG(urgent紧急)Sequence number(顺序号码) ...
分类:其他好文   时间:2014-05-29 04:17:13    阅读次数:354
Number Sequence POJ 1019
给定一个字符串满足规律 11212312345……,求其第k位的数字。算法思路:分组来看,第一组1 第二组12 第三组123 第K组[1:k]1-9组每组1位, 10-99组每组2位 依次类推。网上大部分解法,用一个数组表示到第k组时,一共需要多少位数,但这个方法需要额外的空间,而且空间大小并不是非...
分类:其他好文   时间:2014-05-29 02:46:29    阅读次数:272
LeetCode123:Best Time to Buy and Sell Stock III
题目: Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You may co...
分类:其他好文   时间:2014-05-28 22:37:18    阅读次数:327
【百度之星2014~初赛解题报告】
最近要毕业了,有半年没做比赛了.这次参加百度之星的初赛娱乐一下.现在写一下解题报告.还是先看看四道题的类型吧1.Scenic Popularity 暴力 复杂度O( 100 * 100 * 10000 ) 或者O( T * K * R) 线段树2.Chess DP 复杂度 O(n^2)3.Best ...
分类:其他好文   时间:2014-05-28 13:19:16    阅读次数:261
poj 3368 Frequent values
DescriptionYou are given a sequence ofnintegersa1, a2, ... , anin non-decreasing order. In addition to that, you are given several queries consisting ...
分类:其他好文   时间:2014-05-28 03:20:48    阅读次数:302
[leetcode]_Best Time to Buy and Sell Stock I && II
一个系列三道题,我都不会做,google之答案。过了两道,第三道看不懂,放置,稍后继续。一、Best Time to Buy and Sell Stock I题目:一个数组表示一支股票的价格变换。要求只买卖一次,获得最大收益。思路:一开始我认为是寻找最大、最小值,但由于最大值不一定总是出现在最小值的...
分类:其他好文   时间:2014-05-28 01:21:52    阅读次数:262
LeetCode121:Best Time to Buy and Sell Stock
题目: Say you have an array for which the ith element is the price of a given stock on day i. If you were only permitted to complete at most one transac...
分类:其他好文   时间:2014-05-28 00:55:20    阅读次数:288
LeetCode122:Best Time to Buy and Sell Stock II
题目: Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You may co...
分类:其他好文   时间:2014-05-28 00:53:26    阅读次数:338
poj 1068
题意:给定p数组 让求w数组 p数组;S (((()()()))) P-sequence 4 5 6666//)括号 左边(括号的个数 W-sequence 1 1 1456//)括号所匹配的括号中的括号对数用一个栈来模拟#includeusing namespac...
分类:其他好文   时间:2014-05-28 00:46:16    阅读次数:187
Sequence用堆排序
DescriptionGiven m sequences, each contains n non-negative integer. Now we may select one number from each sequence to form a sequence with m integers...
分类:其他好文   时间:2014-05-28 00:05:22    阅读次数:298
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!