# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
147169 | Bodo171 | Highway Tolls (IOI18_highway) | C++14 | 260 ms | 16328 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.
//sursa de anul trecut de cand nu mergea Yandex
#include "highway.h"
#include <vector>
#include <iostream>
using namespace std;
const int nmax=100005;
vector<int> l[nmax],qr;
vector< pair<int,int> > v[nmax];
int lev[nmax],to_tt[nmax],lg[nmax];
int n,root,levmx,sec;
long long actual,stan,dif;
void dfs(int x)
{
l[lev[x]].push_back(x);
if(lev[x]>levmx) levmx=lev[x];
int nod=0;
for(int i=0;i<v[x].size();i++)
{
nod=v[x][i].first;
if(!lev[nod])
{
lev[nod]=lev[x]+1;
to_tt[nod]=v[x][i].second;
dfs(nod);
}
}
}
int gaseste_primul()
{
//la al doilea ii determini usor nivelul
Compilation message (stderr)
# | 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... |