@[Lovely_Cheese](/user/1279712) 把读入优化一下就可以了
推荐使用fread快读或直接加
```cpp
ios::sync_with_stdio(false),cin.tie(0), cout.tie(0);
```
by Stevehim @ 2024-02-05 20:52:07
@[Stevehim](/user/759274) 加了没用
by Lovely_Cheese @ 2024-02-05 20:59:42
@[Lovely_Cheese](/user/1279712) 你把 `bfs` 里面的 `if(y==ed) return true;` 删掉,然后在最后的地方改为 `return dep[ed];`
by Super_Cube @ 2024-02-05 21:02:42
@[Lovely_Cheese](/user/1279712) 亲测过了。
by Super_Cube @ 2024-02-05 21:05:29