#include #include #include using namespace std; struct Info{ int from,to,cost,time; }; struct Dik{ int vertex; int cost,time; // bool operator<(const Dik &other)const{ // return cost>other.cost; // } }; int main(){ int N,current,ver; cin >> N >> current; cin >> ver; Info info[1500]; for(int i=0 ; i> info[i].from; for(int i=0 ; i> info[i].to; for(int i=0 ; i> info[i].cost; for(int i=0 ; i> info[i].time; queue circle; Dik now;now.vertex=1; now.cost=now.time=0; circle.push(now); map past; int min=1000000000; while(circle.size()!=0){ now=circle.front();circle.pop(); if(now.cost>current)continue; if(now.vertex==N){ if(min>now.time)min=now.time; } Dik next; for(int i=0 ; i