# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
823246 | Dremix10 | Highway Tolls (IOI18_highway) | C++17 | 76 ms | 15176 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;
#define F first
#define S second
#define all(x) (x).begin(),(x).end()
typedef long long ll;
typedef pair<int,int> pi;
typedef pair<ll,ll> pl;
const int N = 3e5+5;
const ll INF = 1e18+5;
const int MOD = 1e9+7;
vector<vector<pi> > a(N);
vector<pi> pos;
vector<pi> par(N);
void dfs(int s, int e, int cur, int f){
if(cur == f){
pos.push_back({par[s].S,s});
return;
}
for(auto x : a[s]){
if(x.F == e)continue;
par[x.F] = {s,x.S};
dfs(x.F,s,cur+1,f);
}
}
void find_pair(int n, vector<int> u, vector<int> v, int A, int B) {
# | 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... |