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

多谢hawk!找到错误了,我狠着心改动一次,提交一次。经过n多wa,终于找出毛病了!^_^

Posted by tide713 at 2005-04-28 17:10:21 on Problem 2386
In Reply To:不是说算法一样程序就一样,那么说,只要知道算法,就不用写程序了,仔细检查你的程序吧 Posted by:hawk at 2005-04-25 22:33:48
找出来错误在哪个地方了!
 if(i>=0&&i<n1&&j>=0&&j<m1&&aaa[i][j]=='W')
      xunhuan(i,j);
应该改成:
       if(i>=0&&i<n1&&j>=0&&j<m1&&aaa[i][j]=='W')
 	  {xunhuan(i,j);i=i-b1;j=j-b2;}
因为开始的时候,我把变量的值改变了。当递归完的时候还应该变成原来的值!
〉〉〉〉〉〉〉
痛并快乐了将近一个星期,不过现在只有快乐了!!!!!

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