| 13 | const int inf = 1e9 + 7; |
| 14 | |
| 15 | void add_edge(vector<pair<int, int>> vec[], int u, int v, int weight) |
| 16 | { |
| 17 | vec[u].push_back({v, weight}); |
| 18 | vec[v].push_back({u, weight}); |
| 19 | } |
| 20 | |
| 21 | // without priority queue |
| 22 | void dijstra1(vector<pair<int, int>> vec[], int v, int source) |