图论
文章平均质量分 87
mowayao
这个作者很懒,什么都没留下…
展开
-
POJ3925 Minimal Ratio Tree
Minimal Ratio Tree Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 1071 Accepted: 389 Description For a tree, which nodes and edges are all weighted, the r原创 2013-10-02 22:15:46 · 802 阅读 · 0 评论 -
KM
今天练的KM算法 POJ2195 裸的,只不过要把正权改成负权 #include #include #include using namespace std; const int maxn = 555; const int inf = 1000000000; int w[maxn][maxn],x[maxn],y[maxn]; int prev_x[maxn],prev_y[maxn],原创 2013-08-22 15:24:39 · 667 阅读 · 0 评论 -
HDU3268 Columbus’s bargain
一道很水的题意复杂的水题,主要在于构图。SPFA搞定 #include #include #include #include #include using namespace std; const int maxn = 30; const int maxm = 900; const int INF = 1000000; vector > > edge; int dist[maxn+原创 2013-10-12 22:19:14 · 686 阅读 · 0 评论 -
UVa10720 - Graph Construction
raph Construction Time Limit 2 Seconds Graph is a collection of edges E and vertices V. Graph has a wide variety of applications in computer. There are different ways to represe原创 2014-03-11 14:17:21 · 798 阅读 · 0 评论 -
UVa10594 - Data Flow
Problem F Data Flow Time Limit 5 Seconds In the latest Lab of IIUC, it requires to send huge amount of data from the local server to the terminal server. The lab setup i原创 2014-04-18 13:12:36 · 688 阅读 · 0 评论 -
二分图最大匹配的König定理及其证明
转自 http://www.matrix67.com/blog/archives/116转载 2014-04-11 20:16:19 · 496 阅读 · 0 评论 -
UVa11183 - Teen Girl Squad(最小树形图-裸)
Problem I Teen Girl Squad Input: Standard Input Output: Standard Output -- 3 spring rolls please. -- MSG'D!! -- Oh! My stomach lining! Strong Bad You are part of a grou原创 2014-08-05 13:00:07 · 1224 阅读 · 0 评论 -
POJ2723-Get Luffy Out(2-SAT)
Get Luffy Out Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 7456 Accepted: 2835 Description Ratish is a young man who always dreams of being a hero. One原创 2014-08-07 18:43:04 · 715 阅读 · 0 评论 -
UVa 12587 Reduce the Maintenance Cost(Tarjan + 二分 + DFS)
题意:n个城市(n 思路:首先边的费用可以通过Tarjan求桥之后求得(利用桥的性质),然后就是二分答案了!对于每个点,如果有个儿子不能维护,那么不可行,否则,试着让儿子去维护边权,如果不可行,只能让父亲承担。 #include #include #include #include #include #include #include #include #include u原创 2014-10-12 12:30:43 · 822 阅读 · 0 评论