摘要: 本题我们可以把物品当作一个点,并且设立一个虚拟原点,然后加上一个限制是不能超过m个等级 因此枚举每个范围求一遍最短路就行,因为我们发现等级差距并不是很大,注意,酋长不一定是最大等级 #include <cstring> #include <iostream> #include <algorithm> 阅读全文
posted @ 2020-05-01 23:08 朝暮不思 阅读(121) 评论(0) 推荐(0)
摘要: 这题建图比较清晰,就是把能走到的权值设为1 #include<iostream> #include<sstream> #include<cstring> #include<queue> using namespace std; const int N=510; int g[N][N]; int d[ 阅读全文
posted @ 2020-05-01 21:05 朝暮不思 阅读(183) 评论(0) 推荐(0)