首页
Python
Java
IOS
Andorid
NodeJS
JavaScript
HTML5
【
HDU4460
】的更多相关文章
HDU4460
#include <iostream> #include <queue> #include <vector> #include <cstring> #include <cstdio> #include <map> using namespace std; #define MAX 9999999 +][+]; +]; +]; int n; map<string,int> mymap; vector<+]; void s…
HDU-4460 Friend Chains(BFS&权为1所有最短路的最大值)
题目: For a group of people, there is an idea that everyone is equals to or less than 6 steps away from any other person in the group, by way of introduction. So that a chain of "a friend of a friend" can be made to connect any 2 persons and it co…
hdu4460 Friend Chains(记忆化广度优先搜索)
题意: 任意两点间最短路中的最长距离. 思路: BFS遍历每个点能到达的最远距离. Tips: vector的clear要与resize联用. #include <bits/stdc++.h> using namespace std; const int M=1100; int n,m; vector<vector<int>> v; int BFS(int s){ vector<vector<int>> d(M); bool vis[M]={0}…