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:崩溃了

Posted by luoguangyao at 2008-12-16 15:56:37 on Problem 1674
In Reply To:崩溃了 Posted by:liangyifeng_rjxy at 2007-09-08 19:39:54
顶,你这个应该是先判断是否是对位,例如
3 ,7 ,1 ,6 ,2 ,4 ,8 ,5 

先找3对应的下标的真值为1.则3<->1;这时候下标为3的元素对位了,
现在下标为1的真值也为1,对位,则找下一位的元素.
为7,则找7对应的真值8,7<->8;这时候下标为7的元素对位,
下标为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