# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
649688 | RealSnake | Commuter Pass (JOI18_commuter_pass) | C++17 | 2087 ms | 15312 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"
#define ll long long
using namespace std;
int n, m, s, t, u, v;
int a[100005];
ll dist[100005], dist2[100005], distt[305][305];
vector<pair<int, ll>> node[100005], node2[100005];
int ind;
ll ans = 1e18;
void solve() {
for(int i = 0; i < ind - 1; i++) {
int b1 = a[i], b2 = a[i + 1];
int sz = node[b1].size();
for(int j = 0; j < sz; j++) {
if(node2[b1][j].first == b2) {
node2[b1][j].second = 0;
break;
}
}
sz = node[b2].size();
for(int j = 0; j < sz; j++) {
if(node2[b2][j].first == b1) {
node2[b2][j].second = 0;
break;
}
}
}
# | 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... |