details killpublic class Solution { public ArrayList spiralOrder(int[][] matrix) { ArrayList res = new ArrayList(); if(matrix==null |...
分类:
其他好文 时间:
2015-04-14 12:49:10
阅读次数:
88
主要是boundary的条件public class Solution { public void rotate(int[][] matrix) { if(matrix==null || matrix.length==0 || matrix[0].length==0) retur...
分类:
其他好文 时间:
2015-04-14 12:45:02
阅读次数:
99
Given the disparity d and 2D point (x, y) , we can derive the 3D depth using the 4-by-4 reprojection matrix Q as follows:The reprojection matrix Q is ...
分类:
其他好文 时间:
2015-04-14 07:17:41
阅读次数:
269
android开发中可能经常会用到这些东西; 一.介绍 Paint:画笔 Canvas:画布 Matrix:变换矩阵 Paint ????根据我们要画的类型,我们可以选择不同的笔,比如大气磅礴的山水画,我们可以选择大头的毛笔;细腻入微的肖...
分类:
移动开发 时间:
2015-04-13 19:11:40
阅读次数:
201
#include#define PRINT(x) printf("%03d ",(x))void spiral_matrix_print(const int matrix[][4],int rows,int columns){ int top,left,i; int bottom = rows-1;...
分类:
其他好文 时间:
2015-04-13 18:40:20
阅读次数:
185
Pattern lock security is generally used in Android handsets instead of a password. The pattern lock can be set by joining points on a 3 × 3 matrix in ...
分类:
其他好文 时间:
2015-04-13 14:24:32
阅读次数:
108
题目
骨牌,一种古老的玩具。今天我们要研究的是骨牌的覆盖问题:
我们有一个2xN的长条形棋盘,然后用1x2的骨牌去覆盖整个棋盘。对于这个棋盘,一共有多少种不同的覆盖方法呢?
举个例子,对于长度为1到3的棋盘,我们有下面几种覆盖方式:
输入
第1行:1个整数N。表示棋盘长度。1≤N≤100,000,000
输出
第1行:1个整数,表示覆盖方案数 MOD 19999997
...
分类:
其他好文 时间:
2015-04-13 11:01:49
阅读次数:
178
Pattern lock security is generally used in Android handsets instead of a password. The pattern lock can be set by joining points on a 3 × 3 matrix in a chosen order. The points of the
matrix are reg...
分类:
其他好文 时间:
2015-04-12 22:44:13
阅读次数:
204
旋转一个元素算是一个比较常见的需求了吧,在支持CSS3的浏览器中可以使用transform很容易地实现,这里有介绍:http://www.css88.com/archives/2168,这里有演示http://www.css88.com/tool/css3Preview/Transform.html...
分类:
其他好文 时间:
2015-04-12 22:28:31
阅读次数:
194
B. Prime Matrix题意很简单,就是求从给定矩阵基础上构造一个素数矩阵需要最少进行多少次加1操作,所谓的素数矩阵是矩阵一行或者一列全为素数。这里可以换一个思路思考,我们可以找出矩阵某行(或某列)元素距其最近的素数的差值,然后对这些差进行排序,最小的数即为所求。当然我们需要预先求一个素数数组...
分类:
其他好文 时间:
2015-04-12 17:26:52
阅读次数:
109