Lang:G++
Edit12345678910111213141516171819202122232425262728293031//============================================================================// Name : test06.cpp// Author :// Version :// Copyright : Your copyright notice// Description : Hello World in C++, Ansi-style//============================================================================#include <iostream>#include <vector>#include <algorithm>using namespace std;struct node{int dis;int index;node(){}node(int x,int y):dis(x),index(y){}//node(const node & h):dis(h.dis),index(h.index){}bool operator<(const node &h) const{return dis > h.dis;}};vector<double> highway(vector<int> &x,vector<int> &y,vector<int> &v){int n = x.size();vector<double> res(n),time(n);vector<node> distoi(n);for(int i = 0;i < n; i++){distoi[i] = node(x[i],i);}