# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
81597 | ToadDaveski | Evacuation plan (IZhO18_plan) | C++14 | 1275 ms | 64628 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>
#define ll long long
#define fr first
#define sc second
using namespace std;
vector <pair <ll,ll> > v[100001];
ll dp[100001],us[100001],pr[100001];
unordered_set <ll> an[100001];
ll ans[100001];
priority_queue <pair <ll,ll> > q;
vector <pair <ll,pair <ll,ll> > > edges;
ll dfs(ll x,ll y)
{
us[x]=-1;
if (x==y) return us[x]=dp[y];
ll ans=0;
for(auto to : v[x])
{
if (us[to.fr]==0)
dfs(to.fr,y);
if (us[to.fr]>0)
ans=max(ans,us[to.fr]);
}
return us[x]=min(ans,dp[x]);
}
bool cmp (pair <ll,ll> a, pair <ll,ll> b)
{
if (a.sc>=b.sc)
return 1;
return 0;
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... |