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 firstacm at 2006-03-11 22:25:51 on Problem 1470
In Reply To:请大牛指教 (for example in Figure 1 the ancestors of node 2 are 2 and 5)是什么意思啊? Posted by:firstacm at 2006-03-11 22:02:37
	for(i=1;i<=count;i++)rmq[i][0]=i;
	t=1;
	for(j=1;j<k;j++){
		for(i=1;i<=count;i++)
			if(d[rmq[i][j-1]]<=d[rmq[i+t][j-1]])
				rmq[i][j]=rmq[i][j-1];
			else rmq[i][j]=rmq[i+t][j-1];
		t*=2;
	}

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