class UnionFindSet(object): """并查表""" def __init__(self, data_list): """初始化两个字典,一个保存节点的父节点,另外一个保存父节点的大小 初始化的时候,将节点的父节点设为自身,size设为1""" self.father_dict... ...
分类:
编程语言 时间:
2018-07-04 21:02:49
阅读次数:
136
Description "Good man never makes girls wait or breaks an appointment!" said the mandarin duck father. Softly touching his little ducks' head, he told ...
分类:
其他好文 时间:
2018-06-29 16:23:44
阅读次数:
199
接上面讲 我们知道虚方法,和重写方法。 但是有没有发现 override和new的作用是差不多的。 但为什么还要单独写出来两个呢? 首先,咱们要明白一个问题,继承是具有线性传播的。 代码中,Son具有Father的方法,属性。换句话 Son使用的Father的方法。在Son的这个继承链上,使用new ...
分派调用 其实分派分为两种,即动态分派和静态分派。我们在了解分派的时候,通常把它们与重写和重载结合到一起。 重载(overload)与静态分派 我们先看一个题: public class Main { static abstract class Father { } static class Son ...
分类:
其他好文 时间:
2018-06-12 23:29:13
阅读次数:
241
ZOJ Problem Set - 1013 Once upon a time, there lived Catherine Ironfist, the Queen of Enroth. One day, she received the news of her father's death. So ...
分类:
其他好文 时间:
2018-06-11 00:26:04
阅读次数:
192
;WITHBOM(Father,ChildCode,BomQty,iLevel)AS(SELECTT0.CodeFather,T1.CodeChildCode,CAST(T1.Quantity/T0.QauntityASDECIMAL(19,4))BomQty,1iLevelFROMOITTT0JOINITT1T1ONT0.Code=T1.FatherUNIONALLSELECTU0.Father
分类:
其他好文 时间:
2018-06-07 13:59:08
阅读次数:
121
#include using namespace std; int n,m,e[9][9],root; int num[9],low[9],flag[9],index; void dfs(int cur,int father) { int child=0; index++; num[cur]=ind... ...
分类:
编程语言 时间:
2018-05-31 02:53:59
阅读次数:
203
家庭 1 how many people are there in your family? 2 there are three people in my family: father、mather and i. 3 what does your father do? 4 he is a worke ...
分类:
其他好文 时间:
2018-05-30 14:27:53
阅读次数:
121
高级选择器分为:后代选择器、子代选择器、并集选择器、交集选择器 后代选择器 使用空格表示后代选择器。顾名思义,父元素的后代(包括儿子,孙子,重孙子) .father .item .a p{color: red;} 子代选择器 使用>表示子代选择器。比如div>p,仅仅表示的是当前div元素选中的子代 ...
分类:
Web程序 时间:
2018-05-23 22:09:15
阅读次数:
211
inherit 继承父元素 定位 举例 : <div class="father"> <p></p> </div> div{ position:fixed; left:0; top:0; } p{ position:inherit;//继承了父元素的fixed;此时就会相对于浏览器定位;不会相对于父 ...
分类:
其他好文 时间:
2018-05-23 11:58:19
阅读次数:
185