P2202 [USACO13JAN]方块重叠Square Overlap P2202 [USACO13JAN]方块重叠Square Overlap P2202 [USACO13JAN]方块重叠Square Overlap 题目描述 Farmer John is planning to build N ...
分类:
其他好文 时间:
2017-11-09 11:38:36
阅读次数:
203
DFS, my solution is to fill each edge of the square one by one. DFS to construct the 1st, then 2nd, then 3rd, then 4th. For each edge I scan all the m ...
分类:
其他好文 时间:
2017-11-08 14:50:43
阅读次数:
171
#coding=gbk#嵩天老师的零基础Python笔记:https://www.bilibili.com/video/av15123607/?from=search&seid=10211084839195730432#page=25 中的30-34讲# 文件循环"""def main(): fil ...
分类:
编程语言 时间:
2017-11-06 15:55:45
阅读次数:
223
实现多态的三个条件:1.要有继承2.要有抽象方法重写3.用父类指针(引用)指向子类对象 重载重写重定义的区别: 1.重载:在同一个类中进行; 编译时根据参数类型和个数决定方法调用; 子类无法重载父类; 父类同名方法被子类该方法覆盖. 2.重写:在父类和子类之间进行; 父类与子类方法有完全相同类型; ...
分类:
其他好文 时间:
2017-11-05 10:22:09
阅读次数:
154
A. Theatre Square A. Theatre Square Theatre Square in the capital city of Berland has a rectangular shape with the size n?×?m meters. On the occasion ...
分类:
其他好文 时间:
2017-11-04 14:49:31
阅读次数:
151
http://mathworld.wolfram.com/CongruentMatrices.html Two square matrices and are called congruent if there exists a nonsingular matrix such that where ...
分类:
其他好文 时间:
2017-11-04 11:22:42
阅读次数:
213
新建对象 赋值和取值操作 var book={ topic:"JavaScript", fat: true }; book.topic 通过点访问 book["fat"] 通过中括号访问,用的比较少 book.author="Flanagan” 增加属性,类似于Map book.content={} ...
分类:
Web程序 时间:
2017-11-01 01:05:31
阅读次数:
217
BFS 类问题 1 Surrounded Regions public void surroundedRegions(char[][] board) { int n = board.length; if (n == 0) { return; } int m = board[0].length; fo ...
分类:
其他好文 时间:
2017-10-31 12:59:36
阅读次数:
211
数组的方法中不修改原数组的方法目前知道就是有四种 原始写的 个人写的low代码 map不是有三个参数吗?用自己乘以自己不就等于平方了吗?修改之后的代码 如果以后不算2平方了咋办,还是用Math.pow,在此修改之后的代码 1 function square(arr) { 2 return arr.m ...
分类:
编程语言 时间:
2017-10-30 14:55:08
阅读次数:
243
1 class Square: 2 def __init__(self,length): 3 self.length = length 4 5 def perimeter(self): 6 return 4*self.length 7 8 def area(self): 9 return self.... ...
分类:
其他好文 时间:
2017-10-29 21:54:51
阅读次数:
150