On an N x N grid, each square grid[i][j] represents the elevation at that point (i,j). Now rain starts to fall. At time t, the depth of the water ever ...
分类:
其他好文 时间:
2018-02-08 15:39:00
阅读次数:
173
import matplotlib.pyplot as pltimport numpy as npfrom sklearn import datasets,linear_modelfrom sklearn.metrics import mean_absolute_error,r2_score# Lo ...
分类:
其他好文 时间:
2018-02-05 23:22:33
阅读次数:
247
Leetcode59 Spiral Matrix II Given an integer n, generate a square matrix filled with elements from 1 to n2 in spiral order. For example, Given n = 3, ...
分类:
其他好文 时间:
2018-02-05 18:46:53
阅读次数:
120
为什么子类的初始化列表不能初始化父类的成员 C++初始化列表是一种效率更高的初始化方法,但也有一些不能使用的场景。 举个例子 以下定义一个矩形,然后再定义一个正方形,继承自矩形。 这段代码有问题吗? 是的,这段代码是无法编译通过的。 虽然乍一看没毛病,继承是public继承,构造是父类先构造,但为什 ...
分类:
其他好文 时间:
2018-02-05 18:44:45
阅读次数:
153
Description FatMouse has stored some cheese in a city. The city can be considered as a square grid of dimension n: each grid location is labelled (p,q ...
分类:
其他好文 时间:
2018-02-04 13:48:10
阅读次数:
134
1.题目描述 mplement int sqrt(int x). Compute and return the square root of x. x is guaranteed to be a non-negative integer. 求开方,输出为整数型 2.题目分析 python自带sqrt ...
分类:
其他好文 时间:
2018-02-03 23:17:41
阅读次数:
353
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-02-03 12:35:02
阅读次数:
178
上次我们添加了一个add_layer函数,这次就要创建一个神经网络来预测/拟合相应的数据。 下面我们先来创建一下虚拟的数据,这个数据为二次曲线数据,但同时增加了一些噪点,其图像为: 相应的创建这些伪造数据的代码为: 有了虚拟的数据之后,我们假装不知道这个数据的规律,因此我们想要通过一个神经网络来根据 ...
分类:
其他好文 时间:
2018-02-02 11:56:15
阅读次数:
229
调用前先声明函数: >>若函数定义在调用点之前,则无需另外声明 >>若函数定义在调用点之后,则需要在调用函数前按如下形式声明函数原型(原型声明) 类型标识符 被调用函数名(含类型说明的形参表) 调用形式 函数名(实参列表) 嵌套调用 在一个函数的函数体中。可以调用另一函数,称为嵌套调用 递归调用: ...
分类:
编程语言 时间:
2018-02-02 11:41:30
阅读次数:
272
Time limit : 2sec / Memory limit : 256MB Problem Statement Snuke got a grid from his mother, as a birthday present. The grid has $H$ rows and $W$ colu ...
分类:
其他好文 时间:
2018-01-29 15:52:42
阅读次数:
281