# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
17160 | murat | Dreaming (IOI13_dreaming) | C++14 | 209 ms | 43704 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 "dreaming.h"
using namespace std;
#define foreach(it, x) for(type(x) it = x.begin(); it != x.end(); it++)
#define type(x) __typeof(x.begin())
#define pb push_back
#define mp make_pair
#define nd second
#define st first
const int N = 1e6 + 5;
const int inf = 1e9 + 5;
typedef pair< int , int > pii;
static int n, m, x, y, z, val[N], h[N];
static vector< pii > v[N];
pii dfs(int node, int root = -1) {
pii tt = mp(0, node);
foreach(it, v[node])
if(it->st != root) {
pii temp = dfs(it->st, node);
temp.st += it->nd;
tt = max(tt, temp);
}
return tt;
}
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... |