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 keefo at 2006-10-19 11:08:51 on Problem 1007
In Reply To:测试了好久都不能发现错误,提交就wrong answer,谁来救救火呀! Posted by:xm1984 at 2006-10-17 18:37:39
while(pb != NULL)
	{
		for(i=0;i<m;i++)
			if(pb->measure == pa[i])《-----这里
			{
				pb->seat = i;
				break;
			}
			pb = pb->next;
	}

这种排序会丢失值相同的情况,在不丢失值得情况下要稳定排序

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