2015-04-15から1日間の記事一覧
Ford-Fulkerson法を最近勉強したのでやっと解けるようになった。二部グラフの最大マッチングのサイズを求めるという典型題中の典型題。 #include <bits/stdc++.h> using namespace std; #define REP(i,n) for(int i=0;i<(int)(n);i++) //Ford-Fulkerson's algorithm struct </bits/stdc++.h>…
Ford-Fulkerson法を最近勉強したのでやっと解けるようになった。二部グラフの最大マッチングのサイズを求めるという典型題中の典型題。 #include <bits/stdc++.h> using namespace std; #define REP(i,n) for(int i=0;i<(int)(n);i++) //Ford-Fulkerson's algorithm struct </bits/stdc++.h>…