Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
多谢hawk!找到错误了,我狠着心改动一次,提交一次。经过n多wa,终于找出毛病了!^_^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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator