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 _Doraemon at 2010-07-30 15:06:26 on Problem 1703
void makeSet(int x)
{
	for(int i=1;i<=MAXN;i++)
	{
		father[i] = i;
		num[i] =1;
		opp[i] = 0;
	}
}

尝试了给opp[i]各种初始化的方式 发现初始化为0 的都能AC
初始化为 -1的都WA 初始化为大的负数的竟然还RE,求大牛给出真相.

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