题目链接:http://dsalgo.openjudge.cn/graph/1/
AC代码
#include <iostream>
#include <unordered_map>
#include <string>
#include <memory.h>
using namespace std;
unsigned int dist[30][30], forw[30][30];
string index2name[30];
unordered_map<string, unsigned int> name2index;
int main() {
ios::sync_with_stdio(false);
memset(dist, -1, sizeof(dist));
memset(forw, -