# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
255342 | Erkhemkhuu | Highway Tolls (IOI18_highway) | C++17 | 261 ms | 19192 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>
#include <highway.h>
using namespace std;
#define ll long long
#define pb push_back
#define mp make_pair
#define F first
#define S second
const int N = 150005;
pair <int, int> par[N];
vector <int> w;
vector < vector <pair <int, int> > > adj(N);
int flat[N], timer;
void dfs(int v, int p) {
flat[timer++] = v;
for(auto &u: adj[v]) {
if(u.F == p) continue;
par[u.F] = {v, u.S};
dfs(u.F, v);
}
return;
}
void run(int l, int r, int type) {
for(int i = l; i <= r; i++)
w[par[flat[i]].S] = type;
return;
}
int go(int l, int r, int max_cost) {
while(l + 1 < r) {
int mid = (l + r) / 2;
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |