摘要:
传送门:http://www.lydsy.com/JudgeOnline/problem.php?id=1070 【题解】 建图非常巧妙 需要仔细思考 我们考虑对第i个工人,倒数第j次修车建点,对于这里面每个点,连到T,流量1费用0表示只能用一次(废话)。 对于每辆车k,都可以连到这个点,流量1,费 阅读全文
摘要:
传送门:http://www.lydsy.com/JudgeOnline/problem.php?id=1066 【题解】 网络流,考虑建模,拆点来满足限制跳多少次即可。 第2000个AC! # include <queue> # include <stdio.h> # include <strin 阅读全文
摘要:
传送门:http://www.lydsy.com/JudgeOnline/problem.php?id=1123 【题解】 tarjan算割点的时候顺便统计即可。 割点的条件是 low[to[i]]>=dfn[x],说明删掉点x这一段就不和其他联通了。 先算不包含祖先的其他连通块的贡献,最后加包含祖 阅读全文
摘要:
传送门:http://www.lydsy.com/JudgeOnline/problem.php?id=1558 【题解】 这题恶心死人了啊。。 网络上题解很多都是看代码看代码。。真是太不负责任了。。我这里详细说一下吧。。 题解在代码下面。 # include <stdio.h> # include 阅读全文