传送门 题意:求无向图割集中平均边权最小的集合. 论文<最小割模型在信息学竞赛中的应用>原题. 分数规划.每一条边取上的代价为1. #include <bits/stdc++.h> using namespace std; inline int read() { , f = ; char ch = getchar(); ; ch = getchar(); } + ch - ; ch = getchar(); } return x * f; } ; ; struct Edge { i…
ZOJ Problem Set - 2676 Network Wars Time Limit: 5 Seconds      Memory Limit: 32768 KB      Special Judge Network of Byteland consists of n servers, connected by m optical cables. Each cable connects two servers and can transmit data in both direction…
题目详解出自 论文 Amber-最小割模型在信息学竞赛中的应用 题目大意: 给出一个带权无向图 G = (V,E), 每条边 e属于E都有一个权值We,求一个割边集C,使得该割边集的平均边权最小,即最小化: 1. 将等式转换,引入x向量,Xi取值为(0,1),得到0-1分数规划常规式: 2.       将其转换得到一个关于的一个函数: 3.       其中为单调递减函数, 当且仅当  = 0 , 为最优值. 然后我们可以二分枚举最优值 , 然后判定当前最优值是否符合要求. 判定思路:  对于…
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=1676 对顶点i,j,起点s=1,终点t=n,可以认为题意要求一组01矩阵use[i][j],使得aveCost=sigma(use[i][j]*cost[i][j])/sigma(use[i][j])最小,且{(i,j)|use[i][j]==1}是图的S-T割 定义F(e)=min(sigma(use[i][j]*(cost[i][j]-a))),明显,F(e)是目标式的变…
[题意]给出一个带权无向图,求割集,且割集的平均边权最小. [分析] 先尝试着用更一般的形式重新叙述本问题.设向量w表示边的权值,令向量c=(1, 1, 1, --, 1)表示选边的代价,于是原问题等价为: Minimize   λ = f(x) = sigma(wexe)/sigma(1*xe) = w•x / c•x 其中, x表示一个解向量,xe∈{0, 1} ,即对于每条边都有选与不选两种决策,并且选出的边集组成一个s-t边割集. 联系已有的知识,这是一个0-1分数规划.在胡伯涛<最小割…
Network Wars Time Limit: 5 Seconds      Memory Limit: 32768 KB      Special Judge Network of Byteland consists of n servers, connected by m optical cables. Each cable connects two servers and can transmit data in both directions. Two servers of the n…
Network Wars 07年胡伯涛的论文上的题:http://wenku.baidu.com/view/87ecda38376baf1ffc4fad25.html 代码: #include <algorithm> #include <cstdio> #include <iterator> #include <limits> #include <vector> #include <string.h> const int N = 11…
Network Wars Time Limit: 5000ms Memory Limit: 32768KB This problem will be judged on ZJU. Original ID: 267664-bit integer IO format: %lld      Java class name: Main Special Judge   Network of Byteland consists of n servers, connected by m optical cab…
ZOJ Problem Set - 2676         Network Wars Time Limit: 5 Seconds      Memory Limit: 32768 KB      Special Judge Network of Byteland consists of n servers, connected by m optical cables. Each cable connects two servers and can transmit data in both d…
题意:求最小割集\(C\),使得\(\frac{\sum_{i∈C} cost_i}{|C|}\)最小 模型就是01分数规划\(\frac{\sum_{i=1}^{m}cost_i*x}{\sum_{i=1}^{m}c_i*x}\),其中\(c_i\)恒为1,\(x\)为\(0\)或\(1\) 令上式为\(λ\),简单变换后有\(\sum_{i=1}^{m}(cost_i-1*λ)x_i\),利用单调性进行二分,迭代时边的代价为\(cost_i-λ\) 整型模板改了下发现跑不动图,随便网上捡了个…