为什么我的代码这么慢?

P3376 【模板】网络最大流

roger_yrj @ 2023-02-19 19:12:02

我的代码

别人的代码


by MSqwq @ 2023-02-19 19:15:35

@roger_yrj 没有当前弧优化


by Usada_Pekora @ 2023-02-19 19:16:44

@roger_yrj if (!in) break;


by roger_yrj @ 2023-02-19 19:18:50

@MSqwq 他在哪里有“当前弧优化”?


by roger_yrj @ 2023-02-19 19:19:12

@Usada_Pekora 他也没有啊


by MSqwq @ 2023-02-19 19:19:43

@roger_yrj

cur[v] = hd[v];  
cur[u] = i;

by Usada_Pekora @ 2023-02-19 19:20:36

@roger_yrj 仔细看, ~i && flow < limit 是什么意思。


by roger_yrj @ 2023-02-19 19:22:09

@MSqwq @Usada_Pekora 谢谢!

此贴完结


by Karieciation @ 2023-02-22 20:09:12

kg


|