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 speedfirst at 2007-02-08 10:50:43 on Problem 1166
例如如果按照遍历的方法,先得到的解决方案是000000001 0000000002 ... 333333333, 假如一个解决方案001122101和101000000的效果对某个输入是一样的,但是前者必然被先找到。

我就加了个判断解决方案长度的办法(发现大家都没加),结果是WA。不加这个判断,按照取第一个找到的方案的方法就OK。真是很奇怪。难道是我理解题意错了?

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