# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
152379 | Breno_XD | Poklon (COCI17_poklon7) | C++14 | 1075 ms | 20376 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>
using namespace std;
#define x first
#define y second
const int MAXN = 1000010;
int n, aans, bans;
int nivel[MAXN];
queue<pair<int,int> > fila;
struct nodes{
int l,r;
};
nodes node[MAXN];
void dfs(int f, int p){
// cout << "Demonstracao: " << f << " " << p << endl;
nivel[f] = nivel[p] + 1;
if(node[f].r < 0) fila.push(make_pair(abs(node[f].r) , nivel[f]+1));
else dfs(node[f].r, f);
if(node[f].l < 0) fila.push(make_pair(abs(node[f].l) , nivel[f]+1));
else dfs(node[f].l, f);
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |