摘要: 洛谷P1087 递归建立树,根据当前树的类型,选择“F”“B”“I” void build(int depth, int start, int end, int root){ if (depth >= n+1) return; int current = root; int flag = check 阅读全文
posted @ 2024-05-27 17:33 若把你比作歌 阅读(29) 评论(0) 推荐(0)
摘要: 洛谷P1030 输入中序先序序列,输出后序 l1-l2为当前中序遍历序列 l3-l4为当前后序遍历序列 #include<bits/stdc++.h> using namespace std; string a, b; struct node{ char self; int left, right; 阅读全文
posted @ 2024-05-27 15:14 若把你比作歌 阅读(26) 评论(0) 推荐(0)