
图论 - 二分图匹配
Napoleon2004
这个作者很懒,什么都没留下…
展开
-
POJ 3041 Asteroids 匈牙利算法
#include<cstdio> #include<cstring> using namespace std; bool used[510]; int n,m,ans,girl[510],a[510][510]; int find(int x){ int i,j; for(j=1;j<=n;j++) if(a[x][j]&&used[j]==0...原创 2018-03-31 13:57:15 · 138 阅读 · 0 评论 -
Swap
Given an N*N matrix with each entry equal to 0 or 1. You can swap any two rows or any two columns. Can you find a way to make all the diagonal entries equal to 1? Input There are seve...原创 2018-05-18 09:37:16 · 244 阅读 · 0 评论