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 |
怎么回事呀??用dfs时要注意啦!!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