Given a positive integer num, write a function which returns True if num is a perfect square else False. Note: Do not use any built-in library functio ...
分类:
其他好文 时间:
2018-06-14 23:58:34
阅读次数:
288
一.C=A*B 1 #矩阵乘法 O(n*3) 2 def square_matrix_multiply(A,B): 3 C = [] 4 n = len(A)#A的阶 5 C = [[0 for col in range(n)] for row in range(n)]#生成n*n的全0矩阵 6 f ...
分类:
其他好文 时间:
2018-06-11 22:01:59
阅读次数:
207
问题描述: Given a positive integer n, generate a square matrix filled with elements from 1 to n2 in spiral order. Example: 解题思路: 这道题我认为主要是找到什么时候变化坐标以及如何变化 ...
分类:
其他好文 时间:
2018-06-11 10:55:40
阅读次数:
163
The movement of the stone obeys the following rules: At the beginning, the stone stands still at the start square. The movements of the stone are rest ...
分类:
Web程序 时间:
2018-06-09 11:36:23
阅读次数:
212
四则运算: tf.add(x,y,name) tf.subtract(x,y,name) tf.multiply(x,y,name) tf.divide(x,y,name) tf.square(x,name) # 平方 tf.pow(x,y,name) # x的y次方 tf.sqrt(x,name) ...
分类:
其他好文 时间:
2018-06-07 19:31:42
阅读次数:
218
H265 h265 一、名词 CTU: 编码树单元 CU: 编码单元 PU: 以CU为根,对CU进行划分,一个预测单元PU包含一个亮度预测块PB和两个色度预测块PB. TU: 以CU为根,变换单元TU是在CU的基础上划分的,跟PU没有关系,采用四叉树划分方式,具体划分有率失真代价决定,下图给出了某个 ...
分类:
其他好文 时间:
2018-06-05 21:11:20
阅读次数:
1199
利用opencv提供的findHomography函数获得一个变换矩阵,然后通过warpPerspective函数透视矫正变换为新的一张图, 下面例子通过透视矫正把一张摆正的广告矫正为用户指定的四边区域,然后通过图片叠加方式把广告替换 ...
分类:
其他好文 时间:
2018-06-05 15:22:06
阅读次数:
175
问题描述: Given a 2D binary matrix filled with 0's and 1's, find the largest square containing only 1's and return its area. Example: 解题思路: 这道题可以用动态规划来解,为 ...
分类:
其他好文 时间:
2018-06-03 10:46:00
阅读次数:
130
问题描述: Implement int sqrt(int x). Compute and return the square root of x, where x is guaranteed to be a non-negative integer. Since the return type is ...
分类:
其他好文 时间:
2018-06-02 11:40:40
阅读次数:
130
https://www.cnblogs.com/zfc2201/archive/2012/12/18/2824112.html ISO Latin-1字符集: 	 — 制表符Horizontal tab — 换行Line feed — 回车Carriage Retur ...
分类:
Web程序 时间:
2018-05-31 10:47:21
阅读次数:
6044