# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
297209 | Bruteforceman | Olympic Bus (JOI20_ho_t4) | C++11 | 899 ms | 5456 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;
const int maxn = 205;
const int maxm = 5e4 + 10;
const long long inf = 1e15;
bool del[maxm];
int l[maxm], r[maxm], w[maxm], c[maxm];
int n, m;
vector <int> g[maxn];
bool imp[maxm];
vector <long long> shortest_path(int src, bool rev = false, bool mark = false) {
vector <long long> d (n, inf);
vector <bool> done (n, false);
d[src] = 0;
while(true) {
int x = -1;
for(int i = 0; i < n; i++) {
if(done[i]) continue;
if(x == -1 || d[x] > d[i]) {
x = i;
}
}
if(x == -1) break;
done[x] = true;
for(int e : g[x]) {
if(del[e]) continue;
if(rev && l[e] == x) continue;
if(!rev && r[e] == x) continue;
int y = l[e] ^ r[e] ^ x;
# | 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... |