码迷,mamicode.com
首页 >  
搜索关键字:graph cut    ( 8632个结果
【leetcode】Clone Graph
Clone an undirected graph. Each node in the graph contains alabeland a list of itsneighbors.OJ's undirected graph serialization:Nodes are labeled uniq...
分类:其他好文   时间:2014-07-19 12:11:53    阅读次数:238
NYOJ 293 Sticks
Sticks时间限制:3000ms | 内存限制:65535KB难度:5描述George took sticks of the same length and cut them randomly until all parts became at most 50 units long. Now he...
分类:其他好文   时间:2014-07-19 11:27:30    阅读次数:264
UVA Graph Coloring
题目如下: Graph Coloring  You are to write a program that tries to find an optimal coloring for agiven graph. Colors are applied to the nodes of the graph and the only availablec...
分类:其他好文   时间:2014-07-19 02:35:06    阅读次数:210
UVA Bandwidth
题目如下: Bandwidth  Given a graph (V,E) where V is a set of nodes and E is a set of arcsin VxV, and an ordering on the elements in V, then the bandwidth of a node v is defined as...
分类:其他好文   时间:2014-07-19 02:26:15    阅读次数:206
侦听服务端口
myport(){foridolsof-i:$i|tail-n+2|tr-s‘‘|cut-d‘‘-f1,8|sort|uniq>portif[[-sport]]thenwhilereadserprodoecho$serislistening:$pro$iportdone<portelseecho$iportisnotlisteningfidone}myport$@效果:分析:tail的使用-n+2是从第2行开始显示tr(translate缩写)主要用..
分类:其他好文   时间:2014-07-19 02:17:55    阅读次数:234
[LeetCode] 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 u...
分类:其他好文   时间:2014-07-19 00:05:00    阅读次数:201
防DDOS 脚本 CC攻击
#!/bin/sh#autherRuM#date20140716cc(){[-fignore.ip.list]||echo"127.0.0.1">ignore.ip.listnetstat-ntu|awk‘{print$5}‘|cut-d:-f4|sort|uniq-c|sort-nr>BAD_IP_LISTwhilereadline;doCURR_LINE_CONN=$(echo$line|cut-d""-f1)CURR_LINE_IP=$(echo$line|cut-d""-f2)iptabl..
分类:其他好文   时间:2014-07-18 13:12:19    阅读次数:239
执行shell脚本遇到错误syntax error: unexpected "then" (expecting "}")
今天执行脚本的时候遇到错误,如下图:root@ApFree:/usr/sbin# ./conntrack_num_graph.sh ./conntrack_num_graph.sh: line 9: syntax error: unexpected "then" (expecting "}")roo...
分类:其他好文   时间:2014-07-18 12:04:31    阅读次数:554
悲观锁和乐观锁
锁( locking ) 业务逻辑的实现过程中,往往需要保证数据访问的排他性。如在金融系统的日终结算 处理中,我们希望针对某个 cut-off 时间点的数据进行处理,而不希望在结算进行过程中 (可能是几秒...
分类:其他好文   时间:2014-07-18 12:03:42    阅读次数:238
数据结构:图论基础
图概述 图(Graph)是一种比线性结构和树形结构都要复杂的数据结构。简单讲,图是由表示数据元素的的集合V和表示数据之间关系的集合E组成。其中,数据元素常称作顶点(vertex),数据之间的关系常称作边(edge)。故图可记为G=,其中V是顶点的有穷非空集合,E是边的集合。在图中顶点的前驱和后继是不设限制的,因此图描述的是一种网状关系。 无向图 若边是无序的或者说是无向的,则称此图是无向图。若无向图中有边(v1,v2)(无向图中边用圆括号表示),则显然(v2,v1)和(v1,v2)是同一条边。...
分类:其他好文   时间:2014-07-18 11:02:46    阅读次数:278
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!