1.在进行qt creator编译qt工程时,报出错误:error while building
deploying project。还可能出现如下提示qt creator needs a tool chain set up to build.
configure a tool chain in p...
分类:
其他好文 时间:
2014-05-29 02:25:59
阅读次数:
532
责任链模式Chain of Responsibility
使多个对象都有机会处理请求,从而避免请求的发送者和接受者间的耦合关系,并沿着这条链传递请求,直到有对象处理它为止
责任链模式关键是建立链接关系,在链中决定谁来处理请求 //抽象处理者 public abstract c...
分类:
其他好文 时间:
2014-05-29 01:35:32
阅读次数:
283
class Solution { public: vector
spiralOrder(vector > &matrix) { vector ret; int cols = 0; ...
分类:
其他好文 时间:
2014-05-28 14:38:02
阅读次数:
236
class Solution { public: vector >
generateMatrix(int n) { vector > matrix; if (n (n, 0)); }...
分类:
其他好文 时间:
2014-05-28 09:42:14
阅读次数:
233
1017 - Exact cover时间限制:15秒内存限制:128兆自定评测5584 次提交
2975 次通过题目描述There is an N*M matrix with only 0s and 1s, (1 8 #include 9 #include
10 #include 11 ...
分类:
其他好文 时间:
2014-05-26 16:48:48
阅读次数:
406
【题目】
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?
【题意】
给定一个nXn的二维矩阵,按时钟方向旋转90度,不能使用额外的数据结构
【思路】
从外向内逐层旋转...
分类:
其他好文 时间:
2014-05-26 05:50:25
阅读次数:
266
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Matrix;
import android.graphics.Paint;
im...
分类:
其他好文 时间:
2014-05-26 05:49:01
阅读次数:
284
A Matrix
题意:按照题目中给定的方法,给你一个矩阵,求出变换出该矩阵的字符串
思路:构造问题,在纸上多画几组就能发现,每次必须从上往下找到一条路径,最后输出这些路径,按照开头最大的最晚输出,找的过程中只要不断往下一层找一个大的即可,并且如果一开使有一行是非递增就是错误
代码:
#include
#include
#include
#include
using names...
分类:
其他好文 时间:
2014-05-26 05:24:51
阅读次数:
220
【题目】
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 ],
[ 7, 6, 5 ]
]
【题意】
给定整数n, 将1,2,3...nxn个数按螺旋旋转的方式填入n...
分类:
其他好文 时间:
2014-05-25 07:08:17
阅读次数:
235
【题目】
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 should return [1,2,3,6,9,8,7,4,5].
【题意】
螺旋输出MxN...
分类:
其他好文 时间:
2014-05-24 23:11:02
阅读次数:
279