# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
152380 | Breno_XD | Poklon (COCI17_poklon7) | C++14 | 386 ms | 72660 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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... |