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 Berry at 2007-08-18 11:08:25 on Problem 2893
说一下我感觉要注意的地方:
没必要按解题报告说的在N是偶数的时候交换行列顺序,直接按行为主写成一维数组求逆序数即可,
0也是要放到序列中去一起求逆序数的
在M,N有一个为偶数时,目标序列的逆序数为M*N-1,是一个奇数;
最后还要加上0到目标位置的曼哈顿距离;

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