[抄题]: 给出 n = 8 返回 [[2,2,2],[2,4]] // 8 = 2 x 2 x 2 = 2 x 4 [暴力解法]: 时间分析: 空间分析: [思维问题]: [一句话思路]: [输入量]:空: 正常情况:特大:特小:程序里处理到的特殊情况:异常情况(不合法不合理的输入): [画图]: ...
分类:
其他好文 时间:
2018-02-21 10:39:00
阅读次数:
183
A matrix is Toeplitz if every diagonal from top left to bottom right has the same element. Now given an M x N matrix, return True if and only if the m ...
分类:
其他好文 时间:
2018-02-20 23:13:33
阅读次数:
208
Description 小宇从历史书上了解到一个古老的文明。这个文明在各个方面高度发达,交通方面也不例外。考古学家已经知道,这个文明在全盛时期有 $n$ 座城市,编号为 $1\cdots n$ 。 $m$ 条道路连接在这些城市之间,每条道路将两个城市连接起来,使得两地的居民可以方便地来往。一对城市之 ...
分类:
其他好文 时间:
2018-02-17 23:12:49
阅读次数:
213
思路: 二维树状数组。点修改区间查询转化为区间修改点查询。 http://blog.csdn.net/z309241990/article/details/9615259 http://blog.csdn.net/acm_BaiHuzi/article/details/46819049 实现: ...
分类:
其他好文 时间:
2018-02-16 18:40:30
阅读次数:
192
要拆第n个环要求保留第n 1拆除前n 2 对于n,先拆掉n 2再去掉n再放回n 2,然后规模降为n 1 f(n)=2f(n 2)+f(n 1)+1 C++ inline ll mod(ll a){return a%MOD;} struct Matrix{ ll mt[5][5],r,c; void ...
分类:
其他好文 时间:
2018-02-15 17:34:47
阅读次数:
178
Problem Description Angel was caught by the MOLIGPY! He was put in prison by Moligpy. The prison is described as a N * M (N, M <= 200) matrix. There a ...
分类:
其他好文 时间:
2018-02-13 16:39:51
阅读次数:
185
2D矩阵变换 matrix(1,0,0,1,0,0) 对应 matrix (a,b,c,d,e,f) 其中,x, y表示转换元素的所有坐标(变量)了, 3*3矩阵每一行的第1个值与后面1*3的第1个值相乘,第2个值与第2个相乘,第3个与第3个,然后相加 ax+cy+e为变换后的水平坐标,bx+dy+ ...
分类:
Web程序 时间:
2018-02-12 15:16:37
阅读次数:
483
```cpp #include #include using namespace std; typedef long long ll; int n, m, T, uu, vv, ww; const int mod=1000000007; char ss[100005]; struct Matrix{... ...
分类:
其他好文 时间:
2018-02-11 18:00:02
阅读次数:
135
You have been given a matrix C N*M, each element E of C N*M is positive and no more than 1000, The problem is that if there exist N numbers a1, a2, … ...
分类:
其他好文 时间:
2018-02-10 15:01:54
阅读次数:
165