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…
题目: 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…
题意: 任意两点间最短路中的最长距离. 思路: 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}…