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 OSJake at 2009-06-21 14:23:24 on Problem 1979
void solve(int m,int n)
{
     if(check(m,n))
     {
                   ans++;
                   visited[m][n]=true;
                   solve(m-1,n);
                   solve(m+1,n);
                   solve(m,n-1);
                   solve(m,n+1);
       }
}
递归四次没剪枝这是O(4^n)⊙﹏⊙b汗

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