摘要:
链接: https://www.acwing.com/problem/content/166/ 题意: 给定一张N个点M条边的有向无环图,分别统计从每个点出发能够到达的点的数量。 思路: 先拓扑排序求出顺序, 再通过bitset利用位运算,记录并集, 可以解决重复计算的问题. 代码: c++ inc 阅读全文
posted @ 2019-09-16 23:34
YDDDD
阅读(184)
评论(0)
推荐(0)
摘要:
链接: https://www.luogu.org/problem/P3810 submit 题意: 一个元素三个属性, x, y, z, 给定求f(b) = {ax using namespace std; const int MAXN = 2e5+10; struct Node { int x, 阅读全文
posted @ 2019-09-16 20:02
YDDDD
阅读(166)
评论(0)
推荐(0)
摘要:
链接: https://www.acwing.com/problem/content/254/ 题意: 给定一个有N个点(编号0,1,…,N 1)的树,每条边都有一个权值(不超过1000)。 树上两个节点x与y之间的路径长度就是路径上各条边的权值之和。 求长度不超过K的路径有多少条。 思路: 点分治 阅读全文
posted @ 2019-09-16 17:35
YDDDD
阅读(153)
评论(0)
推荐(0)
摘要:
链接: https://vjudge.net/problem/Gym 100741A 题意: Mathematicians are interesting (sometimes, I would say, even crazy) people. For example, my friend, a m 阅读全文
posted @ 2019-09-16 15:53
YDDDD
阅读(185)
评论(0)
推荐(0)
摘要:
链接: https://nanti.jisuanke.com/t/41402 题意: To seek candies for Maomao, Dudu comes to a maze. There are nn rooms numbered from 11 to nn and mm undirect 阅读全文
posted @ 2019-09-16 13:28
YDDDD
阅读(275)
评论(0)
推荐(0)

浙公网安备 33010602011771号