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 frkstyc at 2005-06-09 16:59:15 on Problem 1007
In Reply To:Re:ft,那个确实不是冒泡啊,刚才一直纳闷他怎么错了,居然是我看错了 Posted by:hubo430 at 2005-06-09 16:58:18
> 冒泡是不是该这样写啊:
> for(i=0;i<=num-2;i++)
> 		{k=i;min=b[i];
> 		for(j=i+1;j<=num-1;j++)	if(min>b[j]) {min=b[j];k=j;}
> 		if(k!=i){strcpy(c,a[i]);strcpy(a[i],a[k]);strcpy(a[k],c);e=b[i];b[i]=b[k];b[k]=e;}
> 		}

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