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

粗心的代价

Posted by B10330224 at 2011-09-04 15:56:40 on Problem 1703
int find(int x)
{
	if(fa[x]==x)  return x;
    int tx=find(fa[x]);
	rank[x]=(rank[x]+rank[fa[x]])%2;
       fa[x]=tx;//原来一直忘了这句话,结果一直tle
	return fa[x];
}

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