// 2005‘“à—\‘ID Traveling by Stagecoach #include #include #include #include #include using namespace std; class Node{ public: int pos, ticket; double cost; Node(int pos, int ticket, double cost) : pos(pos), ticket(ticket), cost(cost) {} bool operator < (const Node &nd) const { return cost > nd.cost; } }; int main(){ int n, m, p, a, b; int t[8]; bool visit[256][31]; double dist[256][31]; while(cin >> n >> m >> p >> a >> b, n){ for(int i=0;i> t[i]; vector< vector< pair > > g(m+1); for(int i=0;i> x >> y >> z; g[x].push_back(make_pair(y,z)); g[y].push_back(make_pair(x,z)); } for(int i=0;i<(1< qu; qu.push(Node(a, (1< dist[tic][pos] + g[pos][i].second/t[j]){ dist[tic^(1<