题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=4965题目大意: 给你两个矩阵,A矩阵是n*k,B矩阵是k*n,(其中n 2 #include 3 #include 4 #include 5 #include 6 using namesp...
分类:
其他好文 时间:
2015-03-30 12:37:46
阅读次数:
107
Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order.
For example,
Given the following matrix:
[
[ 1, 2, 3 ],
[ 4, 5, 6 ],
[ 7, 8, 9 ]
]
You ...
分类:
其他好文 时间:
2015-03-29 23:49:53
阅读次数:
369
Spiral Matrix
Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order.
For example,
Given the following matrix:
[
[ 1, 2, 3 ],
[ 4, 5, 6 ],
...
分类:
其他好文 时间:
2015-03-29 16:31:20
阅读次数:
132
Given an integer n, generate a square matrix filled with elements from 1 to
n2 in spiral order.
For example,
Given n = 3,
You should return the following matrix:
[
[ 1, 2, 3 ],
[ 8, 9, 4 ],
[ ...
分类:
其他好文 时间:
2015-03-28 17:17:30
阅读次数:
124
Normally vector is column vector, it is defined as:$$\beta=(\beta_1,\dots,\beta_k)$$For scalar function $f(\beta)$, derivative with respect to column ...
分类:
其他好文 时间:
2015-03-22 10:35:51
阅读次数:
160
最近在帮老师做一个项目,类似于景点通的App手机应用,我们是要精细化一些室内的地图,室内的地图采用的是自己的一套定位机制,所有室内地图也要自己来实现,参考了网上一些例子,考虑到效率的问题,最后决定使用SurfaceView来进行地图绘制,实现的功能有:
双击放大
多点触摸放大
地图拖拽
添加地图标记
效果图一张: 代码思路1.处理缩放和拖拽事件
在这里我利用了Matrix类提供的图片操作方法去进...
分类:
移动开发 时间:
2015-03-22 09:18:08
阅读次数:
350
题意:给你一个联接矩阵,问你这个 它的转置矩阵x原矩阵 的 和是多少。解题思路:最后可以发现就是这些点的度的平方的和。解题代码: 1 // File Name: a.cpp 2 // Author: darkdream 3 // Created Time: 2015年03月21日 星期六 14时0....
分类:
其他好文 时间:
2015-03-22 00:13:38
阅读次数:
127
1.图片旋转 private Drawable rotatDrawable(Drawable drawable, float angle){ Matrix matrix = new Matrix(); Bitmap bitmap = ((BitmapDrawable) d...
分类:
其他好文 时间:
2015-03-21 16:59:48
阅读次数:
148
题目链接:search-a-2d-matrix
/**
*
Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties:
Integers in each row are sorted from le...
分类:
其他好文 时间:
2015-03-21 14:07:18
阅读次数:
140