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

直接生成结果。但还是需要30MS.

Posted by huicpc39 at 2006-08-23 07:50:27 on Problem 2965
In Reply To:当然可以 不过那样的时间复杂度是O(n^6) n=4 而且写起来也麻烦 此题有O(n^2)算法 n=4 Posted by:TheBeet at 2006-08-20 10:12:29
开一个4X4的Bool数组,开始全为false.
如果输入(i,j)处有"+",将该行该列取反。
最后有多少true就是最少步数。输出为true的坐标就是步骤。

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