You are given a string s containing lowercase English letters, and a matrix shift, where shift[i] = [direction, amount]: direction can be 0 (for left ...
分类:
其他好文 时间:
2020-04-15 00:33:42
阅读次数:
52
Problem Description Give you two numbers A and B, if A is equal to B, you should print "YES", or print "NO". Input each test case contains two numbers ...
分类:
其他好文 时间:
2020-04-14 20:21:08
阅读次数:
70
template<class T, class U> auto operator+(const Matrix<T>& a, const Matrix<U>& b) -> Matrix<decltype(T{}+U{})> { Matrix<decltype(T{}+U{})> res; for(in ...
分类:
其他好文 时间:
2020-04-14 10:47:21
阅读次数:
50
2020-04-12 23:33:56 -- Edit by yangrayIdentityTransform继承于Affine2DBase类,它是一个高效实现原地变换的类。(不知道有什么用,变换前后都一样) IdentityTransform(Affine2DBase):方法 frozen(sel ...
分类:
其他好文 时间:
2020-04-13 00:19:35
阅读次数:
112
1170. 重塑矩阵 中文English 在MATLAB中,有一个非常有用的函数叫做'reshape',它可以将矩阵重新整形为一个不同大小的矩阵,但保留其原始数据。 先给出一个由二维数组表示的矩阵,以及两个正整数r和c,分别表示所需重新整形矩阵的行数和列数。 重新形成的矩阵需要用原始矩阵的所有元素以 ...
分类:
其他好文 时间:
2020-04-12 16:09:13
阅读次数:
68
Problem Description Give you the width and height of the rectangle,darw it. Input Input contains a number of test cases.For each case ,there are two n ...
分类:
其他好文 时间:
2020-04-11 23:29:43
阅读次数:
97
85. 最大矩形 给定一个仅包含 0 和 1 的二维二进制矩阵,找出只包含 1 的最大矩形,并返回其面积。 示例: 输入: [ ["1","0","1","0","0"], ["1","0","1","1","1"], ["1","1","1","1","1"], ["1&quo ...
分类:
其他好文 时间:
2020-04-11 20:08:55
阅读次数:
63
Problem Description Give you a number on base ten,you should output it on base two.(0 < n < 1000) Input For each case there is a postive number n on b ...
分类:
其他好文 时间:
2020-04-10 00:29:53
阅读次数:
80
HDOJ 1051. Wooden Sticks 题目 There is a pile of n wooden sticks. The length and weight of each stick are known in advance. The sticks are to be process ...
分类:
其他好文 时间:
2020-04-08 20:48:30
阅读次数:
82
一、题目说明 题目240. Search a 2D Matrix II,从一个m n的二维矩阵查找一个整数,每一行从左到右递增,每一列从上到下递增。 二、我的解答 先计算矩阵中点 ,然后将矩阵分成4个区间: 性能如下: ...
分类:
其他好文 时间:
2020-04-08 09:56:09
阅读次数:
46