摘要:
Maximum Sum 大意:给你一个n*n的矩阵,求最大的子矩阵的和是多少。 思路:最開始我想的是预处理矩阵,遍历子矩阵的端点,发现复杂度是O(n^4)。就不知道该怎么办了。问了一下,是压缩矩阵,转换成最大字段和的问题。 压缩行或者列都是能够的。 int n, m, x, y, T, t; int 阅读全文
posted @ 2016-03-17 12:05
mengfanrong
阅读(188)
评论(0)
推荐(0)
摘要:
Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top? 思路:题目也比較简单。类似斐波那契。 代码例如以下: public class Solution { pu 阅读全文
posted @ 2016-03-17 10:37
mengfanrong
阅读(407)
评论(0)
推荐(0)
摘要:
Eclipse 3.6 (Helios): http://download.eclipse.org/bpmn2-modeler/updates/helios Eclipse 3.7 - 4.2.1 (Indigo - Juno): http://download.eclipse.org/bpmn2- 阅读全文
posted @ 2016-03-17 09:42
mengfanrong
阅读(363)
评论(0)
推荐(0)
摘要:
项目中须要检測ListView的上滑下滑隐藏顶部View控件,之前在网上也有非常多实现案例。在git上发现个封装非常不错的样例,记录下来。 GestureDetector是一个手势检測类,内部有个SimpleOnGestureListener手势监听类。 定义一个抽象类SimpleDetector。 阅读全文
posted @ 2016-03-17 08:10
mengfanrong
阅读(314)
评论(0)
推荐(0)
浙公网安备 33010602011771号