使用ImageView时经常会用到scaleType属性,如: scaleType属性的各个值总是记不住之间的区别。今天找点时间总结了一下:scaleType的属性值有:matrix fitXY fitStart fitCenter fitEnd center centerCrop centerI....
分类:
移动开发 时间:
2014-07-16 22:58:00
阅读次数:
248
uva11992:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=3143题意:给你n*m的矩阵初始化的时候矩阵里面的元素全部是0,对于这个矩阵有3中操作。1...
分类:
其他好文 时间:
2014-07-13 22:35:03
阅读次数:
286
如果直接对矩阵元素进行二分查找的话,时间复杂度是O(m*n),其实很容易想到先通过查找找到对应可能存在于哪一行,然后再在那行中查找是否存在,采用最简单的直接查找这样时间复杂度仅有O(m+n),如果这两次查找再分别采用二分查找的话,时间复杂度更可以降低到O(logm+logn),下面是O(m+n)的代码:...
分类:
其他好文 时间:
2014-07-13 18:50:21
阅读次数:
228
Matrix Chain Multiplication
Suppose you have to evaluate an expression like A*B*C*D*E where A,B,C,D and E are matrices. Since matrix multiplication is associative, the order in which multi...
分类:
其他好文 时间:
2014-07-13 18:10:40
阅读次数:
223
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 ],
[...
分类:
其他好文 时间:
2014-07-13 16:37:16
阅读次数:
199
利用C语言来解决类似迷宫的问题,下面例子分别用两种方法来解决![Problem]There is a maze as shown in the diagram below. In the maze in the form of a 100*100 matrix, the white backgrou...
分类:
编程语言 时间:
2014-07-13 10:07:16
阅读次数:
285
Sum
Time Limit: 2000/1000MS (Java/Others)Memory Limit: 128000/64000KB (Java/Others)
SubmitStatisticNext
Problem
Problem Description
You are given an N*N digit matrix and you can get seve...
分类:
其他好文 时间:
2014-07-12 22:17:10
阅读次数:
236
Sum
Time Limit: 2000/1000MS (Java/Others) Memory Limit: 128000/64000KB (Java/Others)
SubmitStatus
Problem Description
You are given an N*N digit matrix and you can get several horizontal o...
分类:
其他好文 时间:
2014-07-12 21:17:15
阅读次数:
182
J - Sum
Time Limit: 2000/1000MS (Java/Others) Memory Limit: 128000/64000KB (Java/Others)
SubmitStatus
Problem Description
You are given an N*N digit matrix and you can get several horizont...
分类:
其他好文 时间:
2014-07-12 20:26:54
阅读次数:
269
http://poj.org/problem?id=2155MatrixTime Limit:3000MSMemory Limit:65536KTotal Submissions:17721Accepted:6653DescriptionGiven an N*N matrix A, whose el...
分类:
其他好文 时间:
2014-07-12 15:09:54
阅读次数:
201