/* clear the queue, hash table, to prepare for the next game */ void clearMemo() { DEBUG("IN"); clearQue(que); ht->cleartable(ht); DEBUG("OUT"); }
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); } } }