摘要:
题目链接:https://www.luogu.org/problemnew/show/P2194 第一问:缩点并且统计其强连通分量里的最小耗费。把所有强连通分量的最小耗费加起来。 第二问:统计在每个强连通分量里与最小耗费相同的点数。乘法原理统计所有强连通分量答案。 include include i 阅读全文
摘要:
题目链接:https://www.luogu.org/problemnew/show/P3627 把点权转化到边权上去。 include include include include include include using namespace std; const int maxn = 500 阅读全文
摘要:
题目链接:https://www.luogu.org/problemnew/show/P2860 考虑在无向图上缩点。 运用到边双、桥的知识。 缩点后统计度为1的点。 度为1是有一条路径,度为2是有两条路径。 include include include include include using 阅读全文