请用栈模拟dfs java容易爆
stack.add(new Bool(S,0)); while(!stack.isEmpty()) { Bool b1 = stack.pop(); dfs(b1.u,b1.father); }