EASY CPP SOLUTION
Code
# Code\n```cpp []\nclass Solution {\npublic:\n    int minCost(int maxTime, vector<vector<int>>& edges, vector<int>& passingFees) \n    {\n        int n = passingFees.size();\n\n        vector<vector<vector<int>>> graph(n , vector<vector<int>> ());\n\n        vector<pair<int , int>> dist(n , {INT_MAX , INT_MAX});\n        // {fee , time}\n\n        set<pair<pair<int , int> , int>> store;\n        // {{fee , time} , {u}}\n\n        dist[0] = {0 , 0};\n\n        store.insert({{passingFees[0] , 0} , 0});\n\n        for(auto i : edges)\n        {\n            graph[i[0]].push_back({i[1] , i[2]});\n            graph[i[1]].push_back({i[0] , i[2]});\n        }    \n\n        while(!store.empty())\n        {\n            auto front = *(store.begin());\n            int fee = front.first.first;\n            int time = front.first.second;\n            int u = front.second;\n\n            store.erase(front);\n\n            if(u == n - 1) return fee;\n\n            for(auto i : graph[u])\n            {\n                int v = i[0];\n                int FEE = fee + passingFees[v];\n                int TIME = time + i[1];\n\n                if((dist[v].first <= FEE && dist[v].second <= TIME) || TIME > maxTime) continue;\n\n                dist[v] = {FEE , TIME};\n\n                store.insert({{FEE , TIME} , v});\n            }\n\n        }\n\n        return -1;\n\n    }\n};\n```
['C++']