| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
Re:我记得好像叫匈牙利算法吧In Reply To:请问这个是神马模板????用这个过了N个水题了,,,不知道它叫什么还,,, Posted by:yy17yy at 2010-12-03 10:54:10 > 用这个过了N个水题了,,,不知道它叫什么还,,,
>
> bool dfs(int i)
> {
> int j;
> for(j=1;j<=num;j++)
> {
> if(!v[j]&&map[i][j])
> {
> v[j]=true;
> if(match[j]==0||dfs(match[j]))
> {
> match[j]=i;
> return true;
> }
> }
> }
> return false;
> }
> //v->visit
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator