[Loj]#6003. 「网络流 24 题」魔术球

我是直接用贪心跑的,但其实能够用网络流来跑。网络 对于网络流,经过分析能够获得,若是将i+j为彻底平方数的i与j连上边。spa 那么每一根柱子就是一条路径,答案就是有n条路径的最小路径覆盖。code 能够本身画图YY。io #include <cstdio> #include <cmath> #include <vector> using namespace std; const int N=65
相关文章
相关标签/搜索