# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
433964 | AugustinasJucas | Highway Tolls (IOI18_highway) | C++14 | 300 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 "highway.h"
#include <bits/stdc++.h>
using namespace std;
const int dydis = 1e5 + 10;
vector<pair<int, int> > gr[dydis];
int n, m;
long long light, heavy;
int tevas[dydis];
int dist[dydis];
int virs[dydis];
vector<pair<int, int> > brn;
int getLen(){
vector<int> st;
for(int i = 0; i < m; i++) st.push_back(0);
return 1ll * ask(st) / light;
}
void dfs(int v, int came = -1, int dst = 0){
dist[v] = dst;
if(came == -1) virs[v] = -1;
for(auto x : gr[v]){
if(x.first == came) continue;
tevas[x.first] = v;
virs[x.first] = x.second;
dfs(x.first, v, dst+1);
}
}
vector<pair<int, int> > getInds(int v, int len){ // first - brianos indeksas, sec - virsunes
dfs(v, -1);
vector<pair<int, int> > ret;
for(int i = 0; i < n; i++){
# | 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... |