自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(4)
  • 收藏
  • 关注

原创 UVA 753 - A Plug for UNIX

最大流的模板题 前n个 连接汇点 中间m个连接源点 最后k个为中间路径 #include #include #include #include #include using namespace std; #define M 2020 #define INF 1 int n,m,s,t,k,l; int head[M],end[M]; int flow[M][M

2012-12-07 17:41:20 336

原创 11045 - My T-shirt suits me

最大流的问题  设立一个源点为0  与衣服之间的容量为n/6 一个汇点 与志愿者之间的容量为1  志愿者与衣服之间容量为1 图建好了 套上模版就能AC #include #include #include using namespace std; #define M 220 #define INF 1 int n,m,s,t; int flow[M][M],cap[M][M]

2012-12-05 22:18:54 479

原创 10330 - Power Transmission

最大流问题 需要设一个超级源 超级会点 结点也有容量 所以建图的时候要注意一下 #include #include #include using namespace std; #define M 220 #define INF 1 int n,m,B,D,t; int head[M],end[M]; int flow[M][M],cap[M][M],a[M],p[M];

2012-12-05 22:16:39 497

原创 10803 - Thunder Mountain

求出任意A点到B点 的最大距离 folyd求各点出间的距离 #include #include #include double x[110],y[110]; double d[110][110]; double dis(int i,int j) {     double l1 = x[i] - x[j];     double l2 = y[i] - y[j];

2012-12-02 21:42:03 453

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除