コード例 #1
0
ファイル: Klotski.c プロジェクト: zhengxiaoyan/Klotski_C
/* clear the queue, hash table, to prepare for the next game */
void clearMemo() {
	DEBUG("IN");

	clearQue(que);
	ht->cleartable(ht);

	DEBUG("OUT");
}
コード例 #2
0
ファイル: pro321c.cpp プロジェクト: hillboy/contest
void make(int a,int now){
  bfs(a);
  int b,c,i,j;
  b=que[tt];
  clearQue();
  bfs(b);
  c = que[tt];
  clearQue();
  i=(de[c]+1)/2;
  for(j=1;j<i;j++){
    c=fa[c];
  }
  checked[c]=1;
  ans[c]=now;
  for(i=ind[c];i;i=last[i]){
    if (!checked[e[i]]){
      make(e[i],now+1);
    }
  }
}