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

Re:弱弱的问一句:N!求逆序给show me 学习下不....

Posted by leejun527 at 2008-11-28 10:40:43 on Problem 1007
In Reply To:Re:弱弱的问一句:N!求逆序给show me 学习下不.... Posted by:ABD at 2008-11-28 10:31:37
双重循环就行了啊。
	for(i = 0;i < len;i++)
		for(j = i+1;j < len;j++)
			if(dna[i] > dna[j]) ++sum;
	return sum;

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