日々精進

aikoと旅行とプログラミング

2017-04-18から1日間の記事一覧

【AOJ ALDS1_7】B: Tree - Binary Trees

問題 Binary Trees | Aizu Online Judge 方針 二分木を作ろう. コード #include <iostream> using namespace std; struct Node{ int parent, left, right; }; int n; Node T[30]; int D[30], H[30]; void depth(int u, int d){ if(u == -1) return; D[u] = d; depth(T[</iostream>…