本文共 1162 字,大约阅读时间需要 3 分钟。
数据:
/*
#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