add bool record for DFS
sol of q079