# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1125952 | Kel_Mahmut | Escape Route (JOI21_escape_route) | C++20 | 9090 ms | 111940 KiB |
#include "escape_route.h"
#include <bits/stdc++.h>
#define pb push_back
#define endl ("\n")
#define all(aa) aa.begin(), aa.end()
typedef long long ll;
using namespace std;
vector<long long> calculate_necessary_time(
int n, int m, long long S, int q, vector<int> A, vector<int> B,
vector<long long> L, vector<long long> C, vector<int> U,
vector<int> V, vector<long long> T) {
const ll inf = 1e18;
vector<vector<array<ll, 3>>> g(n);
for(int i = 0; i < m; i++){
g[A[i]].pb({B[i], L[i], C[i]});
g[B[i]].pb({A[i], L[i], C[i]});
}
vector<vector<ll>> mes(n, vector<ll>(n, inf));
for(int u = 0; u < n; u++){
priority_queue<array<ll, 2>, vector<array<ll, 2>>, greater<array<ll, 2>>> pq;
pq.push({0, u});
vector<int> vis(n);
while(!pq.empty()){
auto [d, v] = pq.top(); pq.pop();
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |