删边(normal)
来源:互联网 发布:linux配置防火墙端口 编辑:程序博客网 时间:2024/03/29 05:15
删边(normal)
Time Limit:1000MS Memory Limit:65536K
Total Submit:107 Accepted:66
Description
连通图是指任意两个顶点都有路径可互相到达的图
读入一个无向连通图,输出最多能删除掉多少条边,使这个图仍然连通.
Input
第一行为图的顶点数N(1<=N<=100)和边数M,用一个空格隔开,图中的顶点用1到N的整数标号.接下来的M行,每行两个数V1,V2表示一条边.V1,V2用一个空格隔开,表示这条边所连接的顶点的标号(V1<>V2),同一条边不会重复出现!
Output
输出最多能删除掉的边数.
Sample Input
4 6
1 2
1 3
1 4
2 3
2 4
3 4
Sample Output
3
这题看起来很难,但做起来不算难,也就是要知道这题连通图的原理是怎样的,即可!
var i,j:longint;begin readln(i,j); i:=j-i+1; writeln(i);end.
0 0
- 删边(normal)
- 删边(normal)
- 删边(normal)
- [图论]删边(normal)
- (ssl1217)删边(normal)
- 删边(normal)P1217
- normal
- Normal
- Normal Mapping
- normal form
- normal transform
- Normal Distribute
- Normal Map
- vertex normal
- Normal Mapping
- normal distribution
- normal map
- normal equation
- B1031. 查验身份证(15)
- 2017.3.23 信息技术
- 菜鸟的Linux学习史——第五章 简析命令
- mysql中 insert …select …带来的死锁问题
- Hadoop cdh版本分布式集群搭建图文教程
- 删边(normal)
- 3.23课前检测
- table单元格新增行并编辑
- static、extern、const关键字浅析
- 选择结构
- CPP无符号整型减法溢出
- GYM 101086 H.Another Square in the Floor(水~)
- 21天实战caffe
- MySQL 联合索引详解