码迷,mamicode.com
首页 >  
搜索关键字:one    ( 27922个结果
[leetcode] Word Break
1 problemGiven a stringsand a dictionary of wordsdict, determine ifscan be segmented into a space-separated sequence of one or more dictionary words.F...
分类:其他好文   时间:2014-09-26 19:22:58    阅读次数:165
[LeetCode] Maximum Product Subarray的两种思路
Find the contiguous subarray within an array (containing at least one number) which has the largest product. For example, given the array [2,3,-2,4], the contiguous subarray [2,3] has the larges...
分类:其他好文   时间:2014-09-26 15:03:38    阅读次数:359
[数位dp] spoj 10738 Ra-One Numbers
题意:给定x、y,为[x,y]之间有多少个数的偶数位和减去奇数位和等于一。 个位是第一位。 例子: 10=1-0=1 所以10是这样的数 思路:数位dp[i][sum][ok] i位和为sum 是否含有前导0. 然后就是因为有负数 所以根据范围把0设置为100 然后最后和等于101则为所求的数。 代码: [cpp] view plaincopyprint? #...
分类:其他好文   时间:2014-09-26 05:06:08    阅读次数:228
zoj 1503 - One Person "The Price is Right"
题目:有一个数字让你猜,你有k次机会,并且有k个保险如果猜的低了会高度你低了,             高了会告诉你高了,并且失去一k保险(k=0时猜高了就会失败),现在问你能猜的数字范围。 分析:dp,二维动态规划。按保险k和猜的机会n递增的方向dp。             状态:f(G,L)为有G次猜的机会,L个保险时确定的数字范围(1~N);             转移方程:F(...
分类:其他好文   时间:2014-09-26 02:35:38    阅读次数:180
UVa11555 - Aspen Avenue
今晚CF GYM A题,神坑。。原题:Aspen Avenue``Phew, that was the last one!'' exclaimed the garden helper Tim as he threw the last tree plant to the ground. His emp...
分类:Web程序   时间:2014-09-26 02:22:08    阅读次数:320
Java项目中总结的一些优化
1.当在循环中遍历某一个值时,最好结合break、continue控制。List list=new ArrayList(5); list.add("one"); list.add("two"); list.add("three");遍历取值two:for(int i=0;i list=new Arr...
分类:编程语言   时间:2014-09-26 02:00:28    阅读次数:231
[LeetCode]Maximum Product Subarray
Find the contiguous subarray within an array (containing at least one number) which has the largest product. For example, given the array [2,3,-2,4], the contiguous subarray [2,3] has the larges...
分类:其他好文   时间:2014-09-26 01:16:58    阅读次数:271
vlan pvid vid access口 trunk口
VLAN技术浅谈 http://www.h3c.com.cn/MiniSite/H3care_Club/Data_Center/Net_Reptile/The_One/Home/Catalog/200911/655250_97665_0.htm百度百科vlan http://baike.baidu....
分类:数据库   时间:2014-09-25 23:24:27    阅读次数:400
zoj1610 线段树
1 //Accepted 804 KB 40 ms 2 //整个题,都是坑 3 //1.The first line of each data set contains exactly one integer n, 4 //1 9 #include 10 #include...
分类:其他好文   时间:2014-09-25 22:14:17    阅读次数:260
[leetcode] Best Time to Buy and Sell Stock
Problem:Say you have an array for which theithelement is the price of a given stock on dayi.If you were only permitted to complete at most one transac...
分类:其他好文   时间:2014-09-25 21:10:47    阅读次数:171
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!