摘要: 做这道题的时候混淆了满二叉树和完全二叉树的概念: 满二叉树:顾名思义,就是塞满了 完全二叉树:除了最后一层之外,每一层都必须是满的,且最后一层如果不满,则所有节点都尽可能靠左。 #include <iostream> #include <stdio.h> #include <algorithm> # 阅读全文
posted @ 2024-03-04 12:17 Gold_stein 阅读(9) 评论(0) 推荐(0) 编辑
摘要: #include <cstdio> #include <cstring> #include <iostream> #include <algorithm> #include <vector> using namespace std; const int N = 100010; int n; stru 阅读全文
posted @ 2024-03-04 11:17 Gold_stein 阅读(2) 评论(0) 推荐(0) 编辑
摘要: #include <cstdio> #include <cstring> #include <iostream> #include <algorithm> using namespace std; typedef long long LL; const int N = 500010; int n, 阅读全文
posted @ 2024-03-04 10:53 Gold_stein 阅读(4) 评论(0) 推荐(0) 编辑