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

ac了,说说我的思路

Posted by Cathy11 at 2008-05-27 21:41:21 on Problem 2488
看了很久的题目,然后不认识的单词竟然是字典序,这个是看了dicuss的出来的,
就很简单的dfs,不用去比较排序,在设置
move[8][2]//八个方向
就考虑一下它的顺序,这样第一找出来的那个一定是满足题意的。
move[8][2]={{-2,-1},{-2,1},{-1,-2},{-1,2},{1,-2},{1,2},{2,-1},{2,1}}
不用说为什么吧

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