上一页 1 ··· 5 6 7 8 9 10 下一页
摘要: 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 comple 阅读全文
posted @ 2016-03-17 16:23 fisherinbox 阅读(134) 评论(0) 推荐(0) 编辑
摘要: public class S053 { //kadane's algorithm //(如果不止一个数时)最大子数组第一个数肯定大于零,从最大子数组中某个数开始往前的数之和肯定大于零 public int maxSubArray(int[] nums) { if(nums.length == 0) return 0; ... 阅读全文
posted @ 2016-03-16 22:05 fisherinbox 阅读(152) 评论(0) 推荐(0) 编辑
摘要: 时间限制:2000ms 单点时限:1000ms 内存限制:256MB 时间限制:2000ms 单点时限:1000ms 内存限制:256MB 描述 给定两个日期,计算这两个日期之间有多少个2月29日(包括起始日期)。 只有闰年有2月29日,满足以下一个条件的年份为闰年: 1. 年份能被4整除但不能被1 阅读全文
posted @ 2016-03-16 17:49 fisherinbox 阅读(285) 评论(0) 推荐(0) 编辑
摘要: public class S121 { public int maxProfit(int[] prices) { //TLE /* if(prices.length0;i--){ prices[i] = prices[i]-prices[i-1]; } for(int i = 1;iresult) ... 阅读全文
posted @ 2016-03-13 16:41 fisherinbox 阅读(192) 评论(0) 推荐(0) 编辑
摘要:   阅读全文
posted @ 2016-03-11 20:44 fisherinbox 阅读(156) 评论(0) 推荐(0) 编辑
摘要:   阅读全文
posted @ 2016-03-11 20:12 fisherinbox 阅读(160) 评论(0) 推荐(0) 编辑
摘要: 在windows下.lm和.dict同时为ANSI编码,输出正确,否则输出乱码或不输出结果。 阅读全文
posted @ 2016-03-11 17:06 fisherinbox 阅读(164) 评论(0) 推荐(0) 编辑
摘要: configure: error: Could not link test program to Python. Maybe the main Python library has been installed in some non-standard library path. If so, pa 阅读全文
posted @ 2016-03-11 11:25 fisherinbox 阅读(1258) 评论(0) 推荐(0) 编辑
摘要:   阅读全文
posted @ 2016-03-10 22:34 fisherinbox 阅读(151) 评论(0) 推荐(0) 编辑
摘要: 虽然官网给出了很多可能的原因,最可能的原因还是因为缺少某个库文件。最近解决的一个为例总结一下思路 Winmm.lib; ad_win32.obj : error LNK2019: unresolved external symbol __imp__waveInGetErrorTextW@12 ref 阅读全文
posted @ 2016-03-10 16:00 fisherinbox 阅读(1369) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 下一页