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 axlsdtkl at 2012-09-13 16:51:51 on Problem 3740
把下面这段双向链表改一下顺序,然后跳舞链就会出错了,这是为什么?
    remove(x);
    for(i=D[x];i!=x;i=D[i])
    {
        for(j=R[i];j!=i;j=R[j])remove(lie[j]);
        dlx();if(ok)return;
        for(j=L[i];j!=i;j=L[j])resume(lie[j]);
    }
    resume(x);

改成
  remove(x);
    for(i=D[x];i!=x;i=D[i])
    {
        for(j=R[i];j!=i;j=R[j])remove(lie[j]);
        dlx();if(ok)return;
        for(j=R[i];j!=i;j=R[j])resume(lie[j]);
    }
    resume(x);

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