加个优化试试看
```cpp
#pragma GCC optimize(1,2,3,s,"Ofast","inline")
```
by huanghaotong2011 @ 2024-04-16 21:45:17
@[huanghaotong2011](/user/1045961) 谢谢您,不过其实我是想知道是什么原因导致TLE(比如常数过大,因为记搜的复杂度我记得是 O(n + m) 的)
by qW__Wp @ 2024-04-17 08:12:23
还是拓扑快(
by qW__Wp @ 2024-04-17 08:13:07
@[qW__Wp](/user/453555) 可能是因为输入数据量过大导致的,可以把cin cout改成scanf printf或在主函数开头加入流优化
```cpp
ios::sync_with_stdio(false),
cin.tie(nullptr),
cout.tie(nullptr);
```
by huanghaotong2011 @ 2024-04-17 22:04:07