# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
400525 | Cantfindme | Commuter Pass (JOI18_commuter_pass) | C++17 | 2068 ms | 262148 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
#define int long long
typedef pair<int,int> pi;
#define f first
#define s second
#define FAST ios_base::sync_with_stdio(0); cin.tie(0);
#define all(x) x.begin(),x.end()
const int maxn = 100010;
const int INF = LLONG_MAX/2;
const int mod = 1e9+7;
int n, e;
int S,T,U,V;
vector <pi> adjlist[maxn];
int dist[4][maxn];
void dijkstra(int st, int arr[]) {
priority_queue <pi, vector<pi>, greater<pi>> pq;
pq.push(pi(0,st));
arr[st] = 0;
while (!pq.empty()) {
auto [d,x] = pq.top(); pq.pop();
if (arr[x] != d) continue;
for (auto [i,c] : adjlist[x]) {
if (arr[i] == -1 or arr[i] > c + d) {
# | 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... |