码迷,mamicode.com
首页 >  
搜索关键字:graph cut    ( 8632个结果
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
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
mxGraph绘图区域使用鼠标滚轮实现放大/缩小
// 重写鼠标滚轮事件 mxEvent.addMouseWheelListener = function (funct) { } // 增加初次加载事件 window.onload = function () { var element= document.getElementById('graph'); addScrollListener(element, wheelHa...
分类:其他好文   时间:2014-06-28 09:06:26    阅读次数:311
LA 5031
Graph and QueriesTime limit: 3.000 secondYou are given an undirected graph withNvertexes andMedges. Every vertex in this graph has an integer value as...
分类:其他好文   时间:2014-06-27 15:37:28    阅读次数:239
Ubuntu安装编译OpenCV一键脚本(带ffmpeg)
1.切换到用户目录cd ~2.新建一个文件,命名为opencv.sh 脚本如下:version="$(wget -q -O - http://sourceforge.net/projects/opencvlibrary/files/opencv-unix | egrep -m1 -o '\"[0-9](\.[0-9])+' | cut -c2-)" echo "Installing OpenCV"...
分类:其他好文   时间:2014-06-27 10:52:48    阅读次数:262
UVA11090 Going in Cycle!! (二分+SPFA判断有无负权)
I I U P C 2 0 0 6 Problem G: Going in Cycle!! Input: standard input Output: standard output   You are given a weighted directed graph with n vertices and...
分类:其他好文   时间:2014-06-27 08:07:16    阅读次数:183
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!