当前位置: 首页 > news >正文

自己做网站 有名6vue.js 可以做网站吗

自己做网站 有名6,vue.js 可以做网站吗,深圳网站建设方维,wordpress蘑菇街最大流问题。ISAP算法。注意可能会有重边#xff0c;不过我用的数据结构支持重边。距离d我直接初始化为0#xff0c;也可以用BFS逆向找一次。-----------------------------------------------------------------------#includecstdio#includeiostream#inclu… 最大流问题。ISAP算法。注意可能会有重边不过我用的数据结构支持重边。距离d我直接初始化为0也可以用BFS逆向找一次。-----------------------------------------------------------------------#includecstdio#includeiostream#includealgorithm#includecstring#includevector#includequeue#define rep(i,l,r) for(int il;ir;i)#define dow(i,l,r) for(int il;ir;i--)#define clr(x,c) memset(x,c,sizeof(x))using namespace std;const int inf0x3f3f3f3f,maxn2005;struct edge {    int from,to,cap,flow;};struct ISAP {    int n,m,s,t;    vectoredge edges;    vectorint g[maxn];    int d[maxn];    int cur[maxn];    int p[maxn];    int num[maxn];    void init(int n) {        this-nn;        rep(i,0,n) g[i].clear();        edges.clear();    }    void addEdge(int from,int to,int cap) {        edges.push_back((edge){from,to,cap,0});        edges.push_back((edge){to,from,0,0});        medges.size();        g[from].push_back(m-2);        g[to].push_back(m-1);    }    int augment() {        int xt,ainf;        while(x!s) {            edge eedges[p[x]];            amin(a,e.cap-e.flow);            xedges[p[x]].from;        }        xt;        while(x!s) {            edges[p[x]].flowa;            edges[p[x]^1].flow-a;            xedges[p[x]].from;        }        return a;    }    int maxFlow(int s,int t) {        this-ss; this-tt;        int flow0;        clr(d,0);        clr(num,0);        rep(i,0,n) num[d[i]];        int xs;        clr(cur,0);        while(d[s]n) {            if(xt) {                flowaugment();                xs;            }            int ok0;            rep(i,cur[x],g[x].size()) {                edge eedges[g[x][i]];                if(e.cape.flow d[x]d[e.to]1) {                    ok1;                    p[e.to]g[x][i];                    cur[x]i;                    xe.to;                    break;                }            }            if(!ok) {                int mn-1;                rep(i,0,g[x].size()) {                    edge eedges[g[x][i]];                    if(e.cape.flow) mmin(m,d[e.to]);                }                if(--num[d[x]]0) break;                num[d[x]m1];                cur[x]0;                if(x!s) xedges[p[x]].from;            }        }        return flow;    }} isap;int s() {    int n,m;    cinmn;    isap.init(n);    rep(i,0,m) {        int from,to,cap,pd1;        scanf(%d%d%d,from,to,cap);        isap.addEdge(from-1,to-1,cap);    }    return isap.maxFlow(0,n-1);}int main() {    freopen(ditch.in,r,stdin);    freopen(ditch.out,w,stdout);    couts()endl;    return 0;}-----------------------------------------------------------------------  Drainage DitchesHal Burch Every time it rains on Farmer Johns fields, a pond forms over Bessies favorite clover patch. This means that the clover is covered by water for awhile and takes quite a long time to regrow. Thus, Farmer John has built a set of drainage ditches so that Bessies clover patch is never covered in water. Instead, the water is drained to a nearby stream. Being an ace engineer, Farmer John has also installed regulators at the beginning of each ditch, so he can control at what rate water flows into that ditch. Farmer John knows not only how many gallons of water each ditch can transport per minute but also the exact layout of the ditches, which feed out of the pond and into each other and stream in a potentially complex network. Note however, that there can be more than one ditch between two intersections. Given all this information, determine the maximum rate at which water can be transported out of the pond and into the stream. For any given ditch, water flows in only one direction, but there might be a way that water can flow in a circle. PROGRAM NAME: ditch INPUT FORMAT Line 1:Two space-separated integers, N (0 N 200) and M (2 M 200). N is the number of ditches that Farmer John has dug. M is the number of intersections points for those ditches. Intersection 1 is the pond. Intersection point M is the stream.Line 2..N1:Each of N lines contains three integers, Si, Ei, and Ci. Si and Ei (1 Si, Ei  M) designate the intersections between which this ditch flows. Water will flow through this ditch from Si to Ei. Ci (0 Ci  10,000,000) is the maximum rate at which water will flow through the ditch.SAMPLE INPUT (file ditch.in) 5 4 1 2 40 1 4 20 2 4 20 2 3 30 3 4 10OUTPUT FORMAT One line with a single integer, the maximum rate at which water may emptied from the pond. SAMPLE OUTPUT (file ditch.out) 50转载于:https://www.cnblogs.com/JSZX11556/p/4295472.html
http://www.zqtcl.cn/news/138268/

相关文章:

  • 大兴手机网站建设深圳小程序开发公司
  • c 大型网站开发案例电销系统线路
  • 鸿扬家装网站建设谈谈对seo的理解
  • 七米网站建设做网站也分内存大小的吗
  • 丝足网站的建设南宁关键词排名公司
  • 上饶商城网站建设亚马逊海外购官方网
  • 做网站代理商好赚吗高端品牌男鞋有哪些
  • 农产品网站建设及优化项目商务网站建设 视频
  • 北京兼职做网站建设百度app平台
  • 网站建设头部代码网站怎么做咨询
  • 网站运营 网站建设北京公司网站制作要多少钱
  • 郑州看妇科最好的医院是哪里南宁百度seo软件
  • 深圳市住房与建设局实名制网站手机网站打不开被拦截怎么办
  • 公司做网站的价格几千元wordpress 修改页脚
  • 专业网站建设公司在线咨询宁波网站推广公司价格
  • 网站搭建系统都有哪些丽水网站开发
  • 网站设计包含哪些技术外行怎么做网站
  • 网站建设运营知识推广软文平台
  • 营销型网站建设用途网站 文件夹结构
  • 制作网站建设策划方案cosy主题wordpress
  • 网站建设服务联享科技net和cn哪个做网站好
  • 深圳网站制作公司哪家好艺考培训学校
  • 潍坊网站的公司电话html网站开发基础
  • 网站模板样式做地图特效的网站
  • 商标查询官方网站有没有免费找客户的软件
  • 网站开发及服务合同行业网站名称
  • 网站建设费包括什么建筑设计领域
  • 网站建设 信科网络建行网站会员注册用户名
  • 网站建设的什么是开发实施注意什么网站开发实用技术pdf
  • 网站设计的资质叫什么贵阳网站建设咨询