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:怎么回事呀??用dfs时要注意啦!!In Reply To:怎么回事呀??用dfs时要注意啦!! Posted by:zhuxian at 2009-05-30 18:58:55 > bool dfs(int d) > { > int i; > for(i = 1; i <= count; i++) > if(!check[i] && g[d][i]) > { > check[i] = 1; > if(!link[i] || dfs(link[i])) > { > link[i] = d;// xM[u] = v; > return 1 ; > } > } > return 0 ; > } > 里面用这个就超时if(!check[i] && g[d][i]) > 而把他们交换一下就900ms if( g[d][i]&&!check[i] ) Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator