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 |
求大牛顺序问题把下面这段双向链表改一下顺序,然后跳舞链就会出错了,这是为什么? 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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator