摘要: /* 二分图匹配 建图稍麻烦点 不过 有STL大法带我上天 说正经的 先假设都有关系 然后把确定的没有关系的删掉 这样跑出来的一定是完美匹配 至于确定的匹配嘛 删掉这一条 不再是完美匹配 然后记下排序输出 */ #include #include #include #include #include #define maxn 25 using namespace std; int n,su... 阅读全文
posted @ 2016-07-06 21:56 一入OI深似海 阅读(278) 评论(0) 推荐(0) 编辑
摘要: /*裸地KM*/ #include #include #include #define maxn 110 #define inf 0x3f3f3f3f using namespace std; int n,m,ans,match[maxn],w[maxn][maxn],d; int fx[maxn],fy[maxn],lx[maxn],ly[maxn]; bool Dfs(int i) { ... 阅读全文
posted @ 2016-07-06 21:51 一入OI深似海 阅读(211) 评论(0) 推荐(0) 编辑