发嗲期待

文章
2
资源
0
加入时间
3年0月28天

poj 1797 最短路变形

传送门题意:给你n个点,m条路,每条路有重量限制,问1到n最多能运多重的货物。思路:一开始想dfs+剪枝,结果超时啦!我还是太年轻。后来就根据求最短路的方法稍加变形,就过了。#include#include#include#include#define maxn 1<<29using namespace std;int t,n,m,en;int fst[1005],n