2中我们已经看到,判重的实质就是建立状态数字串(一个int数据)和是否出现(一个bool数据)之间的联系,而STL中刚好提供了mapvalue>这样一种容器,我们可以将状态数字串作为key,是否出现作为...=0,tail1=1,head2=0,tail2=1;//head队头,tail队尾
que1[head1][0]=n,que1[head1][1]=p,que1[head1][2]=head1;/...=head2){//队列不为空则继续搜索
if(tail2-head2>=tail1-head1){//2比1元素多就把1扩展
if(expand(head1,tail1,1,que1))...=0,tail1=1,head2=0,tail2=1;//head队头,tail队尾
que1[head1][0]=n,que1[head1][1]=p,que1[head1][2]=head1;/...tryInsert(n,1,head1);
tryInsert(des,2,head2);
while(head1!