码迷,mamicode.com
首页 >  
搜索关键字:maxflow graph cuts    ( 3774个结果
Problem Clone Graph
Problem Description:Clone an undirected graph. Each node in the graph contains alabeland a list of itsneighbors.Solution: 1 public UndirectedGraph...
分类:其他好文   时间:2014-07-07 16:11:57    阅读次数:192
数据结构之图(术语、存储结构、遍历)
1、相关术语顶点(Vertex)、弧(Arc)、弧头(初始点)、弧尾(终结点)、边(Edge)、有向图(Directed graph)、无向图(Undigraph)、全然图(Completed grapg)、有向全然图、稀疏图(Sparse graph)、稠密图(Dense graph)、权(wei...
分类:其他好文   时间:2014-07-06 18:51:14    阅读次数:321
UVA 10129 Play on Words
题目如下: Play on Words Some of the secret doorscontain a very interesting word puzzle. The team of archaeologists has tosolve it to open that doors. Because there is no other way to open the doors,...
分类:其他好文   时间:2014-07-06 12:12:36    阅读次数:221
UVA 10557 XYZZY
题目如下: Problem D: XYZZY ADVENT: /ad?vent/, n. The prototypical computer adventure game, first designed by Will Crowther on the PDP-10 in the mid-1970s as an attempt at computer-refereed fantasy...
分类:其他好文   时间:2014-07-03 18:09:47    阅读次数:211
UVA 532 Dungeon Master
题目如下: Dungeon Master  You are trapped in a 3D dungeon and need to find the quickest way out!The dungeon is composedof unit cubes which may or may not be filled with rock. It ...
分类:其他好文   时间:2014-07-02 16:53:39    阅读次数:199
UVA 705 Slash Maze
题目如下: Slash Maze  By filling a rectangle with slashes (/) and backslashes (), youcan generate nice little mazes. Here is an example: As you can see, paths in the maze cann...
分类:其他好文   时间:2014-07-02 09:07:46    阅读次数:186
CodeForces 21D Traveling Graph 状压dp+欧拉回路
题目链接:点击打开链接 题意: 给定n个点m条边的无向图 求从1点开始经过每条边至少一次最后回到1点的最小路程 显然就是找一条路径可重复的欧拉回路 思路: 首先对于欧拉回路的结论是:所有点的度数都为偶数 因为所有边至少经过一次,那么可以把题意转换成加最少多少条边使得图满足以上结论 而加的边目的是为了把奇度数转成偶度数,先floyd一下得到任意点间加边的最小花费 dp[i]表示状态...
分类:其他好文   时间:2014-07-01 14:47:43    阅读次数:274
简单图模板 Graph
仿写 networkx 的功能 # -*- coding: cp936 -*- ''' 简单图 Graph: 要求: 关于节点: 功能1.add_node: 通过 add_node 一次性加一个节点 字符串,数字,任何可以被哈希的 python 对象都可以当做节点 ...
分类:其他好文   时间:2014-07-01 08:15:24    阅读次数:281
UVA 784 Maze Exploration
题目如下: Maze Exploration  A maze of rectangular rooms is represented on a twodimensional grid as illustrated in figure 1a. Each point of thegrid is represented by a character. ...
分类:其他好文   时间:2014-07-01 06:57:08    阅读次数:231
Clone Graph
题目 Clone an undirected graph. Each node in the graph contains a label and a list of its neighbors. OJ's undirected graph serialization: Nodes are labeled uniquely. We use # as a separa...
分类:其他好文   时间:2014-06-30 09:01:23    阅读次数:197
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!