# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
382394 | sad | Highway Tolls (IOI18_highway) | C++14 | 170 ms | 13376 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"
#define pb push_back
#define fi first
#define se second
using namespace std;
long long a,b,n;const int N=90090;
int pa[N],what[N],in[N];long long l;vector<int>vv;vector<pair<int,int>>v[N];
vector<int>w;
void dfs(int x,int p,long long le)
{
pa[x]=p;
if(le==0){
vv.pb(x);return;
}
for(auto it:v[x])
{
if(it.se==p)continue;
dfs(it.fi,it.se,le-1);
}
}
int ch(int ll,int r)
{
w.clear();
for(int i=0;i<n-1;i++)w.pb(0);
for(int i=ll;i<=r;i++)
{
w[pa[vv[i]]]=1;
}
long long x=ask(w);
# | 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... |