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 117474335 at 2010-09-21 23:07:15 on Problem 1184
核心: 将转移和变值分离; 
还有一个 令我吃惊的优化:
  先用一个数组预处理出前四项操作的最小步数;
  而且最关键的是   预处理时与输入数据无关, 只要把开始时每个数的位置做操作就可以了;
  这样一来,就可以减少到720 * 6 × 10 中状态了; 而且,你要是高兴的话, 还可以打表!
 否则, 就将是6000000个状态;
怎样? 神奇吧! 

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