Skip to content

bitset优化传递闭包 ​

cpp
for (int k = 1; k <= n; ++k)
  for (int i = 1; i <= n; ++i)
    if (f[i][k]) f[i] |= f[k];