DFS。注意剪枝,0ms。 1 #include 2 #include 3 4 #define
False 0 5 #define True 1 6 #define MAXN 201 7 8 char stra[MAXN], strb[MAXN],
strc[MAXN=e3-e2-1; -...
分类:
其他好文 时间:
2014-06-29 12:35:06
阅读次数:
193
原题地址:https://oj.leetcode.com/problems/search-a-2d-matrix/题意:Write
an efficient algorithm that searches for a value in anmxnmatrix. This matrix has
the...
分类:
编程语言 时间:
2014-06-29 07:56:13
阅读次数:
321
MainActivity如下:
import android.os.Bundle;
import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnTouchListener;
import android.widget.ImageView;
import android.app.Acti...
分类:
移动开发 时间:
2014-06-29 07:18:53
阅读次数:
1336
MainActivity如下:
package cc.c;
import android.app.Activity;
import android.graphics.Bitmap;
import android.graphics.Matrix;
import android.graphics.drawable.BitmapDrawable;
import android.os.Bundle;
...
分类:
移动开发 时间:
2014-06-20 10:07:11
阅读次数:
265
并查集+拓扑排序。使用并查集解决a = b的情况。 1 #include 2 #include 3
#include 4 #include 5 using namespace std; 6 7 #define MAXN 10005 8 9 typedef
struct ...
分类:
其他好文 时间:
2014-06-11 21:54:30
阅读次数:
284
1. 二维数组转置void matrix_transpose(int *src[], int
*dst[], int x, int y){ int i, j; int *psrc, *pdst; i = j = 0; psrc = (int
*)src; pdst = (int *)dst; for...
分类:
其他好文 时间:
2014-06-11 13:29:59
阅读次数:
303
Participate in Reproducible ResearchGeneral
Image ProcessingOpenCV(C/C++ code, BSD lic) Image manipulation, matrix
manipulation, transformsTorch3Visio...
分类:
其他好文 时间:
2014-06-11 10:57:06
阅读次数:
444
开发中遇到一些涉及到Matrix的地方,现在此归纳,便于日后查阅。
通过对ImageView设置Matrix来实现ImageView中图片的单指拖动和两指缩放
核心方法:
imageView.setImageMatrix(matrix);
所以我们的重点在于去操作一个Matrix.
该处主要用到的是利用Matrix实现缩放(Scale)和位移(Translate)...
分类:
移动开发 时间:
2014-06-07 13:46:46
阅读次数:
605
DFS+剪枝。与HDOJ 1455如出一辙。 1 #include 2 #include 3
#include 4 5 #define MAXN 25 6 7 int nums[MAXN], n, len, cnt; 8 char
visit[MAXN]; 9 10 int comp(co...
分类:
其他好文 时间:
2014-06-07 07:23:07
阅读次数:
201
题目链接 You are given an n x n 2D matrix representing
an image. Rotate the image by 90 degrees (clockwise). Follow up: Could you do
this in-place? ...
分类:
其他好文 时间:
2014-06-05 16:56:29
阅读次数:
228