# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
139642 | muradeyn | Crocodile's Underground City (IOI11_crocodile) | C++14 | 2 ms | 376 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 "crocodile.h"
#include <bits/stdc++.h>
#define F first
#define S second
using namespace std;
const int maxx = 1000;
int ext[maxx];
vector< pair<int,int> >adj[maxx];
vector<int> thru[maxx];
void dfs(int s,int p) {
if (ext[s])return;
for (auto to : adj[s]) {
if (to.F == p)continue;
dfs(to.F , s);
if (ext[to.F])thru[s].push_back(to.S);
else {
for (int take : thru[to.F])
thru[s].push_back(take + to.S);
}
}
if (thru[s].size() < 2)thru[s].clear();
sort(thru[s].begin(),thru[s].end());
}
int travel_plan(int n, int m, int R[][2], int L[], int k, int P[]) {
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |