Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

Re:WA的朋友注意了!!!

Posted by xiaoyu1_1 at 2013-07-29 10:47:30 on Problem 1325
In Reply To:Re:WA的朋友注意了!!! Posted by:xiaoyu1_1 at 2013-07-29 10:46:13
> 我是从1开始扫的,所以0机器没算,就是默认和0相连的job,完成了
就是:
for(int i=1;i<n;i++){
		if(cx[i]==-1){
			memset(visited,0,sizeof(visited));
			res+=path(i);
		}
	}

for(int v=1;v<m;v++)
		if(edge[u][v]&&!visited[v]){
			visited[v]=1;
			if(cy[v]==-1 || path(cy[v]))
			{
				cx[u]=v;
				cy[v]=u;
				return 1;
			}
		}

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator