![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
图论
新城R
这个作者很懒,什么都没留下…
展开
-
次短路 - Roadblocks - 一本通 3.2 练习 2
次短路模板原创 2021-12-05 15:55:57 · 134 阅读 · 0 评论 -
spfa - 黑暗城堡 - 一本通 3.1 例 1
题目描述 输入格式 输出格式 样例 输入 4 6 1 2 1 1 3 2 1 4 3 2 3 1 2 4 2 3 4 1 输出 6 题目大意:寻找满足条件的方案数。 分析:用spfa求出最短路,再用其求出每个节点满足条件的数量,并让他们相乘就是总方案树了(eg:1到2有3种方法,2到3有4种方法,则1到3有3×4=12种方法)。 代码 #include<bits/stdc++.h> using namespace std; const int N=1e6,mod=(1<<3原创 2021-11-09 21:50:35 · 302 阅读 · 0 评论