Consider the number triangle shown below. Write a program that calculates the highest sum of numbers that can be passed on a route that starts at the top and ends somewhere on the base. Each step can...
分类:
其他好文 时间:
2015-01-16 10:05:03
阅读次数:
153
https://oj.leetcode.com/problems/gas-station/There areNgas stations along a circular route, where the amount of gas at stationiisgas[i].You have a car...
分类:
其他好文 时间:
2015-01-15 12:29:53
阅读次数:
202
问题描述:
There are N gas stations along a circular route, where the amount of gas at station
i is gas[i].
You have a car with an unlimited gas tank and it costs
cost[i] of gas to travel from statio...
分类:
其他好文 时间:
2015-01-13 23:20:36
阅读次数:
266
ip link listip address showip route showroute -nip neigh showping -c 1 espa043 (add to arp)ip neigh delete 9.3.76.43 dev eth0ip rule listip route list...
分类:
其他好文 时间:
2015-01-12 18:56:42
阅读次数:
170
目前仅适用于windows:192.168.*.*网段适用于上外网的10网段适用于内网route add 10.0.0.0 mask 255.0.0.0 10.34.6.1route add 172.0.0.0 mask 255.0.0.0 10.34.6.1route delete 0.0.0.0...
分类:
其他好文 时间:
2015-01-12 09:11:34
阅读次数:
169
2.1 框架图 -->PREROUTING-->[ROUTE]-->FORWARD-->POSTROUTING--> mangle | mangle ^ mangle nat | &2.1 框架图 -->PREROUTING-->[ROUTE]-->FOR...
分类:
系统相关 时间:
2015-01-11 16:00:29
阅读次数:
352
题目大意:给出一个无向图,问从1到n的最短路发生变化需要割掉最少花费的边权总值是多少。
思路:先要把所有最短路上的边搞出来,一个Floyd就可以解决,然后把所有在最短路上的边都加到最大流的图中,然后跑最小割就是答案。
CODE:
#include
#include
#include
#include
#include
#define MAX 510
#def...
分类:
其他好文 时间:
2015-01-11 09:45:29
阅读次数:
232
题解:
首先那个裸的单源最短路过程就过了吧。
然后说转的最小割。
就是我们考虑到从源点到汇点有多条最短路,我们需要切断一些边,使得所有的最短路都被切断。
首先这是个很裸的模型,切断?最小割!
如果你想不到,那不妨这么想:
我们切断所有最短路,那么每条最短路都有一个路径,上面有若干条边,那么我们需要至少切断其中的一部分。
而所有的局部最短路都满足一个性质:
就是从源点...
分类:
其他好文 时间:
2015-01-11 09:43:43
阅读次数:
130
Pat1087代码
题目描述:
Indeed there are many different tourist routes from our city to Rome. You are supposed to find your clients the route with the least cost while gaining the most happiness.
Input S...
分类:
其他好文 时间:
2015-01-10 01:31:07
阅读次数:
245