博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
hdoj4685
阅读量:4668 次
发布时间:2019-06-09

本文共 1162 字,大约阅读时间需要 3 分钟。

数据:

/*

99999
3 4
3 1 2 4
2 2 3
2 3 4
*/

#include 
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#define mkp make_pairusing namespace std;const double EPS=1e-12;typedef long long lon;const lon SZ=1010,S=2010,T=2011,SSZ=2*SZ,one=1,INF=0x7FFFFFFF,mod=1000000007;lon n,m,dfn[SSZ],low[SSZ],cnt,tot,bel[SSZ];bool mp[SSZ][SSZ],ins[SSZ],mk[SSZ],sz[SSZ];int src[SSZ][SSZ],dep[SSZ],num;stack
stk;/*999993 43 1 2 42 2 32 3 4*/bool bfs(){ memset(dep,0,sizeof(dep)); queue
q; q.push(S); dep[S]=1; for(;q.size();) { int fr=q.front(); q.pop(); //cout<
<
>n>>m; for(lon i=1;i<=n;++i) { src[S][i]=1; lon knum; cin>>knum; for(lon j=0;j
>id; mp[i][id+n]=1; src[i][id+n]=1; } } for(int i=1;i<=m;++i)src[i+n][T]=1; for(;bfs();) { dinic(S,INF); } num=n+m; for(lon i=1;i<=n;++i) { int ok=0; for(int j=1;j<=m;++j) { //cout<
<<" "<
<<" "<
<<" "<
<
ans; //cout<
<<" "<
<
>casenum; //cout<
<
>n;++time) { //printf("Case #%d:\n",time); cout<<"Case #"<

 

转载于:https://www.cnblogs.com/gaudar/p/10721690.html

你可能感兴趣的文章
C#中获取程序集版本号的方法
查看>>
2013吉林通化邀请赛 1004 D-City 并查集求连通分支数
查看>>
Meta http-equiv属性详解
查看>>
python字符串,列表常用操作
查看>>
阅读笔记06
查看>>
《http权威指南》读书笔记14
查看>>
2019 COMPSYS 302 Class Protocol V6
查看>>
win7主机与linux虚拟机共享方法之右键添加Sharing Options
查看>>
网友写的验证码生成方案,可防止绝大多数机械识别。
查看>>
8 个最好的 jQuery 树形 Tree 插件
查看>>
软件质量与测试 黑盒测试
查看>>
Salesforce.com + AutoCAD WS集成研究集锦
查看>>
Office 2007在安装过程中出错
查看>>
浅析Hibernate映射(五)——集合映射
查看>>
java.lang.ClassNotFoundException: com.sun.xml.ws.spi.ProviderImpl解决办法
查看>>
检测到在集成的托管管道模式下不适用的ASP.NET设置的解决方法(非简单设置为【经典】模式)。 - CatcherX...
查看>>
Bitmap处理
查看>>
C语言记录汇总
查看>>
webservices系列(三)——调用线上webservice(天气预报和号码查询)
查看>>
callback 模式
查看>>