E-COM-NET
首页
在线工具
Layui镜像站
SUI文档
联系我们
推荐频道
Java
PHP
C++
C
C#
Python
Ruby
go语言
Scala
Servlet
Vue
MySQL
NoSQL
Redis
CSS
Oracle
SQL Server
DB2
HBase
Http
HTML5
Spring
Ajax
Jquery
JavaScript
Json
XML
NodeJs
mybatis
Hibernate
算法
设计模式
shell
数据结构
大数据
JS
消息中间件
正则表达式
Tomcat
SQL
Nginx
Shiro
Maven
Linux
1273
POJ-
1273
-Drainage Ditches
POJ-
1273
-Drainage Ditches http://poj.org/problem?
aijuans
·
2012-08-13 11:00
ACM_POJ
POJ-
1273
-Drainage Ditches
POJ-
1273
-DrainageDitcheshttp://poj.org/problem?
Cambridgeacm
·
2012-08-13 10:00
最大流poj
1273
//BFS的Edmonds_Karp #include #include usingnamespacestd; constintN=210;//顶点最多个数 constintINF=0x7FFFFFFF;//无穷大 intn,m,map[N][N],path[N],flow[N],start,end;//n为顶点,m为边,map为邻接矩阵 queueq; intbfs(
liang5630
·
2012-08-12 16:00
c
input
Path
MFC中如何修改应用程序(xx.exe)的图标
不采用系统自动生成的图标,方法如下:1、首先在资源视图中导入选中的图标资源;2、在FileView选项卡中双击HeaderFiles节点下的Resource.h节点,打开资源头文件,将我们新加入的图标资源值修改为:
1273
xdhywj
·
2012-08-03 13:00
header
mfc
POJ
1273
Dinic
回顾一下Dinic,还是优化了的,确实要快一点,这个0ms,原来EK算法是15ms.很基础就不讲了。倒是有点感悟到Dinic好在哪里了。再写!代码:#include usingnamespacestd; #defineINF0x7fffffff #definemaxn205 structEdge { intv,f,next; }e[2*maxn]; boolvisit[maxn]; in
aacm1992
·
2012-07-31 19:00
POJ
1273
Drainage Ditches
回顾网络流,学得最好的应该就是最大流了,都已经忘得差不多了。这道题还是很基础的题目啊,原来做过又做了一次。代码:#include usingnamespacestd; #defineINF0x7fffffff #definemaxn205 structEdge { intv,w,next; }e[maxn*2]; inthead[maxn],pre[maxn]; intque[max
aacm1992
·
2012-07-31 09:00
poj
1273
最大流问题
id=
1273
#include #include #include usingnamespacestd;
nywsp
·
2012-07-26 18:00
算法
网络
ini
input
Path
iostream
怎么找回回收站里已经删除的文件
双击文件夹中的“FinalData.exe”,然后弹出一个注册框,公司姓名随便填,那个“注册码”要从“keygen注册机.exe”文件中获取(要是不会获取就复制后面的注册码,注册码1:NTC85345-
1273
jxhui23
·
2012-07-24 15:00
经典的最大流题POJ
1273
百度文库花了5分下的不过确实是自己需要的东西经典的最大流题POJ
1273
——其他练习题 POJ3436 、题意描述:现在有m个池塘(从1到m开始编号,1为源点,m为汇点),及n条水渠,给出这n条水渠所连接的池塘和所能流过的水量
huzhengnan
·
2012-07-20 11:00
算法
优化
百度
SAP
iostream
pair
[置顶] 网络流题目集锦
最大流 POJ
1273
DrainageDitches POJ1274ThePerfectStall(二分图匹配) POJ1698Alice'sChance POJ1459PowerNetwork POJ2112OptimalMilking
qq172108805
·
2012-07-16 10:00
网络
NetWork
internet
Matrix
construction
firing
最大网络流PKU
1273
题目:大意是john想抱住他最爱的三叶草不被水淹没,他要用渠道对水进行引流(引到河流中去),水源为1,河流汇点为n为,问渠道最多能引流多少水本题的注意点:1:存在重边如:1->2=3 1->2=4; 1->2=5;那么 map[1][2]=3+4+5;开始提交错误了好多次,主要是对于存在重边没多加思索,定性思维以为是取最大值,其实不是。应该将其值求和。(……………………………
start0609
·
2012-07-16 09:00
poj
1273
Drainage Ditches--最大流--sap
/* sap的非递归实现0ms还不错 让人纠结的啊我写的是吧d[]初始化为0WA 看别人的模版初始化为m,过了 又看到别人用数组标记,过了(貌似也不对,居然过了) 我写了一个数组标记访问,没过 */ #include #include #include usingnamespacestd; constintN=300; constintinf=0x7fffffff; intmap[N][N]; i
qq172108805
·
2012-07-10 16:00
hdu1532 & pku
1273
Drainage Ditches 网络流(最大流EK算法)
hdu1532&pku
1273
DrainageDitches(最大流EK算法) 本题的算法流程1.初始化pre2.BFS求增广路径P 不存在:break,returnflow;3.求P中最小值aug4
dellaserss
·
2012-07-10 09:00
poj
1273
Drainage Ditches--最大流--Dinic
/* 之前用EK写过这题,现在学dinic,又写了这个题 */ #include #include #include usingnamespacestd; intmap[205][205],lvl[205]; intn,m,ret; intbfs()//分层 { intu,i; memset(lvl,0,sizeof(lvl)); queueq; q.push(1); lvl[1]=1; whil
qq172108805
·
2012-07-05 20:00
poj
1273
最大流 基础题 (内有最详细的最大流分析,很好入门)
详细的最大流基础:http://course.cug.edu.cn/cugFirst/operational_research/main/charpter7/p4.htm#http://www.cppblog.com/mythit/archive/2009/04/19/80470.aspx(里边有点小错误,很明显,但解释的通俗易懂)#include#include#include#include#
challenchenzhipeng
·
2012-06-23 21:42
ACM
最大流模板更新(Dinic)...POJ-
1273
明天就要出发去武汉了..刚才更新了下最大流的模板...较之以前的代码..本次更新主要是两方面... 1.链表存边采取存2*M边,也就是在读入时就将其反向边开在相邻的位置..那么在做剩余网络时就能直接用了..省空间省时间.. 2.DFS当找到一条增广路后..回朔到一个还剩了流量的位置..这使得BFS每次对点分一次层,都最大限度的利用完..真正体现出Dinic的优势..Program:#
kk303
·
2012-04-26 19:00
【网络流】poj
1273
Drainage Ditches
第一次写网络流的算法,巨水的题目......利用残留网络不断的寻找增广路径就行了。#include #include usingnamespacestd; boolaugment(); //capacityofpipe intcapacity[205][205]; //previouspipe intrecord[1005]; intn; boolchecked[205]; queueq;
lwfcgz
·
2012-04-20 13:00
算法
网络
POJ
1273
最大流模板题
看了三天的网络流,总算是切掉一道题了... 还是要安静下来耐心的,自信的切题啊~~嘿嘿~#include #include #include usingnamespacestd; structedge {intf,c;}g[222][222]; structnode {intl,p,a;}list[222]; intN,M,ans,s,t; voidinit() { intu,v,c; mem
sevenster
·
2012-04-08 22:00
c
list
struct
网络
ini
IM
poi
1273
#include #include #include usingnamespacestd; intmap[205][205]; intflag[205]; intflow[205]; intn,m; constintM=0x7FFFFFFF; intstart; //intends; queueg; inlineintminx(inta,intb) { returna>b?b:a; } in
gongqian12345
·
2012-04-06 19:00
网络流&费用流专辑
poj
1273
DrainageDitches网络流第一大水,入门基础题。
kksleric
·
2012-04-05 20:00
c
网络
NetWork
Matrix
产品
Intervals
poj
1273
Drainage Ditches--网络流
#include #include #include usingnamespacestd; intmap[201][210]; intn,m; intf[210]; intpre[210]; intbfs()//广搜找增广路径 { queueq; inttop,i; memset(pre,-1,sizeof(pre));//置前驱 f[1]=999999999;//流到这儿的可增大的流 q.pus
qq172108805
·
2012-04-05 20:00
POJ
1273
Drainage Ditches
转载请注明出处:http://blog.csdn.net/drecik__/article/details/7406127/* *第二道网络流,直接套用之前1149的连续最短增广路法; *由于未考虑到重边,无耻的WA了一次; */ #include #include #include #include usingnamespacestd; #defineMAXN205
Drecik__
·
2012-03-29 10:00
c
struct
网络
ERROR
1273
(HY000): Unknown collation 'gbk_chinese_ci' in table 'x1_common_se
mysql>SELECT*FROMx1_common_sessionWHEREsid='CzaB0a'ANDCONCAT_WS('.',ip1,ip2,ip3,ip4)='127.0.0.1';ERROR
1273
lynnteng0
·
2012-03-02 09:48
安装
error
服务器
休闲
Definition
java
不知和ZZL算法比如何 Load dict in
1273
ms, size=157202 Search pattern: 中国 Searched in 1 ms.
rfv1116
·
2012-02-09 23:00
Pattern
search
【最大流】北大 poj
1273
Drainage Ditches
/* THE PROGRAM IS MADE BY PYY */ /*----------------------------------------------------------------------------// Copyright (c) 2011 panyanyany All rights reserved. URL : http://po
panyanyany
·
2012-01-01 16:00
ACM
网络流
pku
【最大流】北大 poj
1273
Drainage Ditches
/* THE PROGRAM IS MADE BY PYY */ /*----------------------------------------------------------------------------// Copyright (c) 2011 panyanyany All rights reserved. URL : http://poj.org/probl
txf2004
·
2012-01-01 16:00
poj
【最大流】北大 poj
1273
Drainage Ditches
id=
1273
Name:
1273
Dra
panyanyany
·
2012-01-01 16:00
POJ-
1273
(dinic-最大流,递归实现)
层次图层次图,就是把原图中的点按照到到源的距离分“层”,只保留不同层之间的边的图。算法流程1、根据残量网络计算层次图(BFS)。2、在层次图中使用DFS进行增广直到不存在增广路。3、重复以上步骤直到无法增广。constintINF=0x7fffffff; constintV=205; intcap[V][V]; intlevel[V]; intn,m; intS,D; boolbfs
famousDT
·
2011-12-22 16:00
网络最大流问题 poj
1273
Drainage Ditches
网络最大流问题。其实想法很直观,就是找一条流的路径,然后取这条路径上的最大流量,然后更新约束条件,然后再找这样的路径。。。直到没有能继续的路径。 找路径的方法使用的是广度优先搜索。 ps:最近在练习c语言,c语言虽然用起来比c++墨迹,各种注意事项,但是运行速度上跟c++的确不在一个量级上。15msAC,源代码:/* *======================================
mazheng1989
·
2011-12-07 10:00
id=
1273
第一次写最大流的题,,,用的是最复杂的找增光路的方法,,E-K算法,,用bfs找增广路,网络流刚接触路还很长啊,,,加油,,,#include #include #include #include #include #include #defineN205 usingnamespacestd; intmap[N][N]; intn,m; voidEk() {intflow[N][N],f[N],p
smallacmer
·
2011-11-15 11:00
网络流习题集
网络流题目集锦(转)最大流POJ
1273
DrainageDitchesPOJ1274ThePerfectStall(二分图匹配)POJ1698Alice'sChancePOJ1459PowerNetworkPOJ2112OptimalMilking
smallacmer
·
2011-11-15 09:00
poj
1273
Drainage Ditches
poj
1273
DrainageDitches果的网络流,有重边#include #include #include #include using namespace std;const int N=210
purplest
·
2011-09-16 23:00
poj
1273
(dinic....基础题)
处理一下重边。。。。累加就是了。。。。。。。。赤裸裸的dinic模版。。。。0ms。。。#include #include #include #include usingnamespacestd; constintinf=INT_MAX; intmap1[210][210],n,m; intlev[210]; queueque; boolbfs(ints,intt){ intu,i,k; mems
water_glass
·
2011-09-16 12:00
[置顶] 网络流题目集锦
转载自 分享最终编辑 acmcs最大流 POJ
1273
DrainageDitches POJ1274ThePerfectStall(二分图匹配) POJ1698Alice'sChance POJ1459PowerNetwork
fp_hzq
·
2011-08-31 18:00
网络
NetWork
internet
Matrix
construction
firing
poj
1273
网络流的水题,只需注意两点:1.具有多重边,例如:32124125126输出是:152.测试数据有多组,且不是以输入N为0结束。//508K16ms #include #include usingnamespacestd; #defineINF0x7fffffff #defineSIZE205 intcap[SIZE][SIZE],flow[SIZE][SIZE]; intpre[SIZE],d
Non_Cease
·
2011-08-22 16:00
POJ
1273
最大流模板题_Edmonds_Karp
赤果果的网络流...模板题...唯一要留意的是一条边可能会给出多次容量..所以每次都要加起来才是这条边的流量...用Edmonds_Karp写的:/* POJ
1273
最大流模板题.Edmonds_Karp
kk303
·
2011-08-22 10:00
网络
NetWork
网络流题目集锦
最大流 POJ
1273
DrainageDitches POJ1274ThePerfectStall(二分图匹配) POJ1698Alice'sChance POJ1459PowerNetwork POJ2112OptimalMilking
allenjy123
·
2011-08-04 23:00
网络
NetWork
internet
Matrix
construction
firing
网络流题目集锦
最大流POJ
1273
DrainageDitchesPOJ1274ThePerfectStall(二分图匹配)POJ1698Alice'sChancePOJ1459PowerNetworkPOJ2112OptimalMilking
power721
·
2011-07-28 13:00
网络
NetWork
Matrix
Intervals
construction
firing
poj
1273
Drainage Ditches
基础的网络最大流。。。Edmonds-Karp算法飘过。。#include#includeusingnamespacestd;structnode{ intnum,value; };constintsize=210;intmapp[size][size];//原流量intresmapp[size][size];//残余流量intfather[size];boolvisited[
zhang360896270
·
2011-07-24 10:00
c
算法
网络
POJ
1273
Drainage Ditches(Networks flow)
很水的网络流,要注意下建图的时候是+=而不是直接赋值,考虑到有重复路径#include#include#include#definemin(a,b)((a)>(b))?(b):(a)usingnamespacestd;constintmaxn=205;constintInf=0x7fffffff;intm,n;intflow[maxn][maxn],cap[maxn][maxn],cf[maxn]
jxy859
·
2011-07-22 15:00
POJ图论题集(无思路版)
1125StockbrokerGrapevine1135DominoEffect1149*PIGS 1161*Walls1201Intervals1236*NetworkofSchools1251JungleRoadsMST
1273
DrainageDitches1274Th
zhang360896270
·
2011-07-18 14:00
算法
网络
Graph
NetWork
Intervals
construction
1273
装配线调度2
描述某汽车工厂有2个装配线,每个装配线有n个装配站(按顺序编号1~n),两个装配线对应的装配站执行相同的功能,但所用的时间可能不同。经过第i条流水线(i=1,2)的第j个装配站所花的时间为Aij。从第i条流水线的第j个装配站移到第j+1个装配站的时间可以忽略,而移到另外一个流水线的下一个装配站则需要一定的时间Tij。汽车进入流水线不需要花时间,出流水线时需要花时间Tin。汽车的装配需要按顺序经过
jj12345jj198999
·
2011-07-16 08:00
WinCE6.0 BootloaderMain源码分析之OEMLaunch
1273
行判断是
jazka
·
2011-07-15 22:42
职场
休闲
WinCE6.0
WinCE开发
WinCE6.0 BootloaderMain源码分析之OEMLaunch
1273
行
jazka
·
2011-07-15 22:42
职场
休闲
WinCE6.0
OEMLaunch函数
最大流(增广路-EK)poj
1273
DrainageDitchesTimeLimit: 1000MSMemoryLimit: 10000KTotalSubmissions: 31138Accepted: 11423DescriptionEverytimeitrainsonFarmerJohn'sfields,apondformsoverBessie'sfavoritecloverpatch.Thismeansthattheclove
xymscau
·
2011-07-12 21:00
Stream
Integer
input
each
output
Forms
poj
1273
Drainage Ditches
/*Name:poj
1273
DrainageDitchesAuthor:UnimenSunDate:08/06/1121:41Description:祼的最大流*//*解题报告:祼的最大流用Edmonds_Karp
Unimen
·
2011-06-18 18:00
c
Date
算法
POJ
1273
Drainage Ditches
POJ
1273
DrainageDitches求网络流的最大流。注意:可能出现重边!比如第一次c[u][v]=w1,又有c[u][v]=w2,那么从u到v的容量应该为w1+w2!
心如止水
·
2011-05-28 16:00
HDU
1273
小希的迷宫
刚开始我天真的以为是用图论做的,最后一直MLE我就很蛋疼,我说用MAP和string映射怎么他妈就要错呢。。。真的倒塌,自己还是菜菜呀,认真学习中。。。//byashione用一直TLE可能STL速度很慢吧,换成flag标记就好了。#include#include#includeusingnamespacestd;#defineM100001introot[M+1];boolmark,flag[M
a342374071
·
2011-05-26 20:00
poj
1273
DrainageDitchesTimeLimit: 1000MS MemoryLimit: 10000KTotalSubmissions: 28720 Accepted: 10478DescriptionEverytimeitrainsonFarmerJohn'sfields,apondformsoverBessie'sfavoritecloverpatch.Thismeansthatthecl
fp_hzq
·
2011-04-04 10:00
poj
1273
dinic算法求最大流
#include <stdio.h> #include <string.h> //#define DEBUG #ifdef DEBUG #define debug(...) printf( __VA_ARGS__) #else #define debug(...) #endif #define N 201 #define MA
kenby
·
2011-03-07 17:00
最大流
dinic
上一页
5
6
7
8
9
10
11
12
下一页
按字母分类:
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
其他