# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
97361 | TuGSGeReL | Race (IOI11_race) | C++14 | 2730 ms | 47964 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 "race.h"
#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
using namespace __gnu_pbds;
#define ll long long
#define mp make_pair
#define pub push_back
#define pob pop_back()
#define ss second
#define ff first
#define mt make_tuple
#define pof pop_front()
#define fbo find_by_order
#define ook order_of_key
typedef tree<int, null_type, less_equal<int>, rb_tree_tag, tree_order_statistics_node_update> indexed_set;
int i,ans=1e9,c[200001],used[200001];
vector<pair<int,int> >v[200001];
map<int,int>xox,yoy;
inline void dfs(int u, int par){
for(auto x : v[u]) if(x.ff!=par) dfs(x.ff,u);
c[par]+=c[u];
}
inline void dfs1(int u, int parr, int s, int d){
if(yoy.find(s) == yoy.end())yoy[s]=d;
else yoy[s]=min(yoy[s],d);
for(auto x : v[u]){
if(x.ff!=parr && !used[x.ff]) dfs1(x.ff,u,s+x.ss,d+1);
}
}
# | 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... |