码迷,mamicode.com
首页 >  
搜索关键字:father    ( 584个结果
hdu 1116 Play on Words
并查集+有向欧拉回路 有向欧拉通路的判定。并查集用来判断是不是连通图。#include#include#include#includeusing namespace std;const int maxn=100010;int sumru[maxn],sumchu[maxn],father[30],f...
分类:其他好文   时间:2015-06-12 22:15:07    阅读次数:98
公路村村通(30)
用了Kruskal算法来生成最小生成树当然也可以用Prim算法来做#include using namespace std;typedef struct{ int start; int end; int length;}road;int* father;road* map;int ...
分类:其他好文   时间:2015-06-12 19:15:09    阅读次数:108
hdu 1558 Segment set(并查集+判断线段是否相交)
代码: #include #include #include using namespace std; int father[1005]; int son_cnt[1005]; char s[5]; //int cnt; struct point { double x,y; }; point a[1005],b[1005]; int find_father(int x) { ...
分类:其他好文   时间:2015-06-11 09:33:46    阅读次数:171
Linux 文件的基本操作
1>.新建空白文件: touch命令-->$ touch test2>.新建目录: mkdir命令-->$mkdir mydir 使用 -p参数:同时创建父目录-->$mkdir -p father/son/grandson3>.复制文件: cp命令-->$ cp test father/s...
分类:系统相关   时间:2015-06-09 00:53:42    阅读次数:130
【数据结构与算法】并查集基础
1、介绍并查集是一种树型数据结构,用于处理一些不相交集合的合并问题。并查集主要操作有: (1)合并两个不相交集合; (2)判断两个元素是否属于同一个集合; (3)路径压缩;2、常用操作用father[i]表示元素i的父亲结点,例如:用某个元素所在树的根节点表示该元素所在集合;判断两个元素是否属...
分类:编程语言   时间:2015-06-05 15:40:14    阅读次数:172
HDU ACM 5253 连接的管道->最小生成树(并查集)
分析:并查集实现最小生成树。不能用cin和cout(使用了ios::sync_with_stdio(false);都不行),否则TLE。 #include #include #include using namespace std; #define N 1005 int father[N*N]; struct EDGE { int u,v; int len; bool operator...
分类:其他好文   时间:2015-06-02 20:11:10    阅读次数:575
css3弹性盒模型属性整理
display:box;是css3新添加的盒子模型属性,它的出现可以解决我们通过N多结构、css实现的布局方式。经典的一个布局应用就是布局的垂直等高、水平均分、按比例划分。设置父容器样式display:box;.father{ margin: 0 auto; width:...
分类:Web程序   时间:2015-06-02 16:55:59    阅读次数:241
Java动态绑定机制的内幕解惑
在Java方法调用的过程中,JVM是如何知道调用的是哪个类的方法源代码? 这里面到底有什么内幕呢? 这篇文章我们就将揭露JVM方法调用的静态(static binding)和动态绑定机制(auto binding)。     ★ 静态绑定机制 Java代码   //被调用的类  package hr.test;  class Father{        public s...
分类:编程语言   时间:2015-06-01 22:40:47    阅读次数:165
对象向上、向下转型
向上转型(Son-->Father),程序会自动完成父类 父类对象 = 子类实例向下转型(Father-->Son),强制类型转换子类 子类对象 = (子类)父类实例class Father { public void tell() { System.out.println("F...
分类:其他好文   时间:2015-05-31 23:01:49    阅读次数:181
父类的引用指向子类的对象或者接口指向实现类均是可以的
父类的引用指向子类的对象或者接口指向实现类均是可以的。例如(下图为父类的引用指向子类的对象)12345678910111213141516publicclassFather {publicvoidpri() {System.out.println("father");}}publicclassSun...
分类:其他好文   时间:2015-05-29 17:55:44    阅读次数:90
584条   上一页 1 ... 44 45 46 47 48 ... 59 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!