摘要:
题目意思就是要求s到t的最短路径个数和s到t的次短路径个数。 参考了大佬的博客#include#include#include#includeusing namespace std;#define inf 0... 阅读全文
posted @ 2018-07-28 14:10
eason99
阅读(77)
评论(0)
推荐(0)
摘要:
题目意思就是要求s到t的最短路径个数和s到t的次短路径个数。 参考了大佬的博客#include#include#include#includeusing namespace std;#define inf 0... 阅读全文
posted @ 2018-07-28 14:10
eason99
阅读(86)
评论(0)
推荐(0)
摘要:
模板题#include#include#include#includeusing namespace std;#define inf 0x3f3f3f3fstruct node{ int id,f,g;}... 阅读全文
posted @ 2018-07-28 01:14
eason99
阅读(77)
评论(0)
推荐(0)
摘要:
模板题#include#include#include#includeusing namespace std;#define inf 0x3f3f3f3fstruct node{ int id,f,g;}... 阅读全文
posted @ 2018-07-28 01:14
eason99
阅读(82)
评论(0)
推荐(0)
摘要:
最后推出来,建一个最小生成树的花费就是 所有点到1节点的最小距离*对应的点权之和。所有用spfa跑个最短路,然后求和即可。 然后要判断一些节点是是否为0,为0的话最小花费就是0,还有这里无穷大要设置为0x3... 阅读全文
posted @ 2018-07-27 16:00
eason99
阅读(95)
评论(0)
推荐(0)
摘要:
最后推出来,建一个最小生成树的花费就是 所有点到1节点的最小距离*对应的点权之和。所有用spfa跑个最短路,然后求和即可。 然后要判断一些节点是是否为0,为0的话最小花费就是0,还有这里无穷大要设置为0x3... 阅读全文
posted @ 2018-07-27 16:00
eason99
阅读(76)
评论(0)
推荐(0)
摘要:
#include#include#includeusing namespace std;#define maxn 100010#define ll long long#define lson rt>1; b... 阅读全文
posted @ 2018-07-27 11:59
eason99
阅读(68)
评论(0)
推荐(0)
摘要:
#include#include#includeusing namespace std;#define maxn 100010#define ll long long#define lson rt>1; b... 阅读全文
posted @ 2018-07-27 11:59
eason99
阅读(68)
评论(0)
推荐(0)
摘要:
总共有n个星球,然后每个星球都有一个起飞燃料的使用效率a[i]和降落的燃料使用效率b[i],就拿起飞来说,也就是起飞每消耗1吨燃料可以提升的物品吨数,假如起飞前总重为m+f,那么起飞消耗(m+f)/a[i]吨... 阅读全文
posted @ 2018-07-27 09:57
eason99
阅读(93)
评论(0)
推荐(0)
摘要:
总共有n个星球,然后每个星球都有一个起飞燃料的使用效率a[i]和降落的燃料使用效率b[i],就拿起飞来说,也就是起飞每消耗1吨燃料可以提升的物品吨数,假如起飞前总重为m+f,那么起飞消耗(m+f)/a[i]吨... 阅读全文
posted @ 2018-07-27 09:57
eason99
阅读(142)
评论(0)
推荐(0)
浙公网安备 33010602011771号