把简单路径改为连通块,能怎么做?有这道题吗?
我的想法是选直径的中点为根,然后二分答案,然后看看每个点要不要删,可以做到 O(nnlogn)O(n\sqrt{n}\log n)O(nnlogn),但我不知道正确性。。。